chromium/v8/src/builtins/builtins-sharedarraybuffer.cc

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/base/macros.h"
#include "src/base/platform/yield-processor.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/common/globals.h"
#include "src/execution/futex-emulation.h"
#include "src/heap/factory.h"
#include "src/logging/counters.h"
#include "src/numbers/conversions-inl.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/objects/objects-inl.h"

namespace v8 {
namespace internal {

// See builtins-arraybuffer.cc for implementations of
// SharedArrayBuffer.prototype.byteLength and SharedArrayBuffer.prototype.slice

// https://tc39.es/ecma262/#sec-atomics.islockfree
inline bool AtomicIsLockFree(double size) {}

// https://tc39.es/ecma262/#sec-atomics.islockfree
BUILTIN(AtomicsIsLockFree) {}

// https://tc39.es/ecma262/#sec-validatesharedintegertypedarray
V8_WARN_UNUSED_RESULT MaybeHandle<JSTypedArray> ValidateIntegerTypedArray(
    Isolate* isolate, Handle<Object> object, const char* method_name,
    bool only_int32_and_big_int64 = false) {}

// https://tc39.es/ecma262/#sec-validateatomicaccess
// ValidateAtomicAccess( typedArray, requestIndex )
V8_WARN_UNUSED_RESULT Maybe<size_t> ValidateAtomicAccess(
    Isolate* isolate, DirectHandle<JSTypedArray> typed_array,
    Handle<Object> request_index) {}

namespace {

inline size_t GetAddress64(size_t index, size_t byte_offset) {}

inline size_t GetAddress32(size_t index, size_t byte_offset) {}

}  // namespace

// ES #sec-atomics.notify
// Atomics.notify( typedArray, index, count )
BUILTIN(AtomicsNotify) {}

Tagged<Object> DoWait(Isolate* isolate, FutexEmulation::WaitMode mode,
                      Handle<Object> array, Handle<Object> index,
                      Handle<Object> value, Handle<Object> timeout) {}

// https://tc39.es/ecma262/#sec-atomics.wait
// Atomics.wait( typedArray, index, value, timeout )
BUILTIN(AtomicsWait) {}

BUILTIN(AtomicsWaitAsync) {}

namespace {
V8_NOINLINE Maybe<bool> CheckAtomicsPauseIterationNumber(
    Isolate* isolate, DirectHandle<Object> iteration_number) {}
}  // namespace

// https://tc39.es/proposal-atomics-microwait/
BUILTIN(AtomicsPause) {}

}  // namespace internal
}  // namespace v8