diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-15 09:25:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-21 10:38:02 +0000 |
commit | 4db21fe60e9a852298e12d7fce7b5d2bbde7443e (patch) | |
tree | ab5387ec792394ffc1f1956a334e50c5a98b69e7 /src/qml/memory/qv4mmdefs_p.h | |
parent | ddb1b8f226693730e3bdb85a0fe78c7ed3c43a79 (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/memory/qv4mmdefs_p.h')
-rw-r--r-- | src/qml/memory/qv4mmdefs_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/memory/qv4mmdefs_p.h b/src/qml/memory/qv4mmdefs_p.h index edae7293ce..db0ffe11a2 100644 --- a/src/qml/memory/qv4mmdefs_p.h +++ b/src/qml/memory/qv4mmdefs_p.h @@ -51,6 +51,7 @@ // #include <private/qv4global_p.h> +#include <private/qv4runtimeapi_p.h> #include <QtCore/qalgorithms.h> #include <qdebug.h> @@ -265,6 +266,11 @@ struct EngineBase { Value *jsStackTop = 0; quint32 hasException = false; +#if QT_POINTER_SIZE == 8 + quint8 padding[4]; +#endif + MemoryManager *memoryManager = 0; + Runtime runtime; }; #if defined(Q_CC_MSVC) || defined(Q_CC_GNU) #pragma pack(pop) @@ -274,6 +280,8 @@ Q_STATIC_ASSERT(std::is_standard_layout<EngineBase>::value); Q_STATIC_ASSERT(offsetof(EngineBase, current) == 0); Q_STATIC_ASSERT(offsetof(EngineBase, jsStackTop) == offsetof(EngineBase, current) + QT_POINTER_SIZE); Q_STATIC_ASSERT(offsetof(EngineBase, hasException) == offsetof(EngineBase, jsStackTop) + QT_POINTER_SIZE); +Q_STATIC_ASSERT(offsetof(EngineBase, memoryManager) == offsetof(EngineBase, hasException) + QT_POINTER_SIZE); +Q_STATIC_ASSERT(offsetof(EngineBase, runtime) == offsetof(EngineBase, memoryManager) + QT_POINTER_SIZE); } |