aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtimeapi_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-03-15 09:25:52 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-03-21 10:38:02 +0000
commit4db21fe60e9a852298e12d7fce7b5d2bbde7443e (patch)
treeab5387ec792394ffc1f1956a334e50c5a98b69e7 /src/qml/jsruntime/qv4runtimeapi_p.h
parentddb1b8f226693730e3bdb85a0fe78c7ed3c43a79 (diff)
Complete transition to standard layout classes for JIT access
Move the Runtime function pointer array into EngineBase so that we can eliminate the last use of qOffsetOf. For improved cache locality the memory manager point is now also located in the EngineBase. Change-Id: I0b3cf44c726aa4fb8db1206cc414a56c2f522a84 Task-number: QTBUG-58666 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtimeapi_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index 2c898a1880..302facba06 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
+typedef uint Bool;
struct NoThrowEngine;
namespace {
@@ -223,12 +224,7 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> {
F(void, setQmlQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, const Value &value))
struct Q_QML_PRIVATE_EXPORT Runtime {
- Runtime()
- {
-#define INIT_METHOD(returnvalue, name, args) runtimeMethods[name] = reinterpret_cast<void*>(&method_##name);
-FOR_EACH_RUNTIME_METHOD(INIT_METHOD)
-#undef INIT_METHOD
- }
+ Runtime();
typedef ReturnedValue (*UnaryOperation)(const Value &value);
typedef ReturnedValue (*BinaryOperation)(const Value &left, const Value &right);
@@ -259,8 +255,6 @@ static_assert(std::is_standard_layout<Runtime>::value, "Runtime needs to be stan
static_assert(offsetof(Runtime, runtimeMethods) == 0, "JIT expects this to be the first member");
static_assert(sizeof(Runtime::BinaryOperation) == sizeof(void*), "JIT expects a function pointer to fit into a regular pointer, for cross-compilation offset translation");
-#undef FOR_EACH_RUNTIME_METHOD
-
} // namespace QV4
QT_END_NAMESPACE