Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qv4atomics.cpp File Reference

(0dc4fd240a2897c5c443a0ef6d84c416843e4938)

#include "qv4arraybuffer_p.h"
#include "qv4typedarray_p.h"
#include "qv4atomics_p.h"
#include "qv4symbol_p.h"
+ Include dependency graph for qv4atomics.cpp:

Go to the source code of this file.

Functions

 DEFINE_OBJECT_VTABLE (Atomics)
 
static SharedArrayBuffervalidateSharedIntegerTypedArray (Scope &scope, const Value &typedArray, bool onlyInt32=false)
 
static int validateAtomicAccess (Scope &scope, const TypedArray &typedArray, const Value &index)
 
ReturnedValue atomicReadModifyWrite (const FunctionObject *f, const Value *argv, int argc, AtomicModifyOps modify)
 

Function Documentation

◆ atomicReadModifyWrite()

ReturnedValue atomicReadModifyWrite ( const FunctionObject * f,
const Value * argv,
int argc,
AtomicModifyOps modify )

Definition at line 71 of file qv4atomics.cpp.

References QV4::Scope::engine, QV4::Value::fromReturnedValue(), QV4::Scope::hasException(), QV4::ExecutionEngine::throwTypeError(), QV4::Encode::undefined(), QV4::Value::undefinedValue(), validateAtomicAccess(), and validateSharedIntegerTypedArray().

Referenced by QV4::Atomics::method_add(), QV4::Atomics::method_and(), QV4::Atomics::method_exchange(), QV4::Atomics::method_or(), QV4::Atomics::method_sub(), and QV4::Atomics::method_xor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DEFINE_OBJECT_VTABLE()

DEFINE_OBJECT_VTABLE ( Atomics )

◆ validateAtomicAccess()

static int validateAtomicAccess ( Scope & scope,
const TypedArray & typedArray,
const Value & index )
static

Definition at line 58 of file qv4atomics.cpp.

References QV4::Scope::engine, QV4::Scope::hasException(), QStringLiteral, QV4::ExecutionEngine::throwRangeError(), and QV4::Value::toIndex().

Referenced by atomicReadModifyWrite(), QV4::Atomics::method_compareExchange(), QV4::Atomics::method_load(), and QV4::Atomics::method_store().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validateSharedIntegerTypedArray()

static SharedArrayBuffer * validateSharedIntegerTypedArray ( Scope & scope,
const Value & typedArray,
bool onlyInt32 = false )
static

Definition at line 35 of file qv4atomics.cpp.

References QV4::Value::as(), QV4::Scope::engine, QV4::Int32Array, Q_ASSERT, and QV4::ExecutionEngine::throwTypeError().

Referenced by atomicReadModifyWrite(), QV4::Atomics::method_compareExchange(), QV4::Atomics::method_load(), and QV4::Atomics::method_store().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: