diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-11-21 12:29:40 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-11-21 12:29:40 +0100 |
commit | d373d5e7d70e968cfba8957596ed6fe4f46990c8 (patch) | |
tree | c52bf2b0fbbfdb13d644b4050aa7a931ef4b7109 /src/qml/jsruntime/qv4enginebase_p.h | |
parent | 9880acb424fd814501ba5fc4ae1caa989e23fafa (diff) | |
parent | 9af8a47746b69b6040fc149c1d24602a1e25b08f (diff) |
Merge remote-tracking branch 'origin/wip/new-backend' into dev
Conflicts:
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/jsruntime/qv4engine_p.h
src/qml/jsruntime/qv4vme_moth.cpp
tests/auto/qml/qml.pro
Change-Id: Ia7b6ec24c7fcbcbb1786d9e798d2df294020ae37
Diffstat (limited to 'src/qml/jsruntime/qv4enginebase_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4enginebase_p.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4enginebase_p.h b/src/qml/jsruntime/qv4enginebase_p.h index 88f9dfd85c..e0f5f3ffb1 100644 --- a/src/qml/jsruntime/qv4enginebase_p.h +++ b/src/qml/jsruntime/qv4enginebase_p.h @@ -57,31 +57,36 @@ QT_BEGIN_NAMESPACE namespace QV4 { +struct CppStackFrame; + // Base class for the execution engine #if defined(Q_CC_MSVC) || defined(Q_CC_GNU) #pragma pack(push, 1) #endif -struct EngineBase { - Heap::ExecutionContext *current = 0; +struct Q_QML_EXPORT EngineBase { + + CppStackFrame *currentStackFrame = nullptr; - Value *jsStackTop = 0; + Value *jsStackTop = nullptr; quint8 hasException = false; quint8 writeBarrierActive = false; quint16 unused = 0; #if QT_POINTER_SIZE == 8 quint8 padding[4]; #endif - MemoryManager *memoryManager = 0; + MemoryManager *memoryManager = nullptr; Runtime runtime; qint32 callDepth = 0; - Value *jsStackLimit = 0; - Value *jsStackBase = 0; + Value *jsStackLimit = nullptr; + Value *jsStackBase = nullptr; + + IdentifierTable *identifierTable = nullptr; + Object *globalObject = nullptr; - ExecutionContext *currentContext = 0; - IdentifierTable *identifierTable = 0; - Object *globalObject = 0; + // Exception handling + Value *exceptionValue = nullptr; enum { Class_Empty, @@ -90,7 +95,7 @@ struct EngineBase { Class_SimpleArrayData, Class_SparseArrayData, Class_ExecutionContext, - Class_SimpleCallContext, + Class_CallContext, Class_Object, Class_ArrayObject, Class_FunctionObject, @@ -115,8 +120,8 @@ struct EngineBase { #endif 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, currentStackFrame) == 0); +Q_STATIC_ASSERT(offsetof(EngineBase, jsStackTop) == offsetof(EngineBase, currentStackFrame) + 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); |