aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4engine.cpp4
-rw-r--r--src/qml/jsruntime/qv4engine_p.h15
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp7
3 files changed, 14 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 6768de27f1..4c1d3fceb2 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -157,10 +157,10 @@ quintptr getStackLimit()
ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory)
- : memoryManager(new QV4::MemoryManager)
+ : current(0)
+ , memoryManager(new QV4::MemoryManager)
, executableAllocator(new QV4::ExecutableAllocator)
, regExpAllocator(new QV4::ExecutableAllocator)
- , current(0)
, bumperPointerAllocator(new WTF::BumpPointerAllocator)
, jsStack(new WTF::PageAllocation)
, debugger(0)
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 8a7cd75a7b..6974835e8b 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -121,11 +121,6 @@ struct ExecutionContextSaver;
struct Q_QML_EXPORT ExecutionEngine
{
- MemoryManager *memoryManager;
- ExecutableAllocator *executableAllocator;
- ExecutableAllocator *regExpAllocator;
- QScopedPointer<QQmlJS::EvalISelFactory> iselFactory;
-
private:
friend struct ExecutionContextSaver;
friend struct ExecutionContext;
@@ -133,9 +128,16 @@ private:
public:
ExecutionContext *currentContext() const { return current; }
+ Value *jsStackTop;
+ quint32 hasException;
GlobalContext *rootContext;
- Value *jsStackTop;
+ MemoryManager *memoryManager;
+ ExecutableAllocator *executableAllocator;
+ ExecutableAllocator *regExpAllocator;
+ QScopedPointer<QQmlJS::EvalISelFactory> iselFactory;
+
+
Value *jsStackLimit;
quintptr cStackLimit;
@@ -353,7 +355,6 @@ public:
// Exception handling
Value exceptionValue;
- quint32 hasException;
StackTrace exceptionStackTrace;
ReturnedValue throwException(const ValueRef value);
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 22fe4968a2..5f079a7d05 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -150,12 +150,12 @@ Param traceParam(const Param &param)
#define STOREVALUE(param, value) { \
QV4::ReturnedValue tmp = (value); \
- if (context->engine->hasException) \
+ if (engine->hasException) \
goto catchException; \
VALUE(param) = tmp; \
}
#define CHECK_EXCEPTION \
- if (context->engine->hasException) \
+ if (engine->hasException) \
goto catchException
QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code,
@@ -183,7 +183,7 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code,
const uchar *exceptionHandler = 0;
- QV4::Debugging::Debugger *debugger = context->engine->debugger;
+ QV4::ExecutionEngine *engine = context->engine;
#ifdef DO_TRACE_INSTR
qDebug("Starting VME with context=%p and code=%p", context, code);
@@ -658,6 +658,7 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code,
MOTH_END_INSTR(Ret)
MOTH_BEGIN_INSTR(Debug)
+ QV4::Debugging::Debugger *debugger = context->engine->debugger;
if (debugger && (instr.breakPoint || debugger->pauseAtNextOpportunity()))
debugger->maybeBreakAtInstruction(code, instr.breakPoint);
MOTH_END_INSTR(Debug)