diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-24 15:57:31 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-26 16:59:33 +0000 |
commit | e4e220fb568e22a4da7e6bd3d28ac34038041759 (patch) | |
tree | 2327058e1997f3b3d73a0313ce96fe5fe7e7c777 /src/qml/jsruntime/qv4engine.cpp | |
parent | 7bdb46c5aae3da345653fe91fbe9281b39015497 (diff) |
Partial Atomics support
Implement support for basic atomic operations on
SharedArrayBuffers.
Half of the methods still need a proper implementation.
Change-Id: Ia88da358e0c2ae6d28e9bcc1feb8980b6f51a812
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 351bca1ce7..d6cfb1dcc1 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -91,6 +91,7 @@ #include "qv4reflect_p.h" #include "qv4proxy_p.h" #include "qv4stackframe_p.h" +#include "qv4atomics_p.h" #if QT_CONFIG(qml_sequence_object) #include "qv4sequenceobject_p.h" @@ -552,6 +553,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) for (int i = 0; i < NTypedArrayTypes; ++i) globalObject->defineDefaultProperty((str = typedArrayCtors[i].as<FunctionObject>()->name()), typedArrayCtors[i]); ScopedObject o(scope); + globalObject->defineDefaultProperty(QStringLiteral("Atomics"), (o = memoryManager->allocate<Atomics>())); globalObject->defineDefaultProperty(QStringLiteral("Math"), (o = memoryManager->allocate<MathObject>())); globalObject->defineDefaultProperty(QStringLiteral("JSON"), (o = memoryManager->allocate<JsonObject>())); globalObject->defineDefaultProperty(QStringLiteral("Reflect"), (o = memoryManager->allocate<Reflect>())); |