aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-03 14:41:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 16:55:12 +0100
commit245f5ce7bb194438fc643e5c928382f47556e2f2 (patch)
tree73d82c57dddf8e8e0c206cd50fe8af4542d3f299 /src/qml/jsruntime/qv4vme_moth.cpp
parent4c4bddb0254acbc53b80e804bbbc26cfdd4e87a1 (diff)
Add a Line instruction to the interpreter
This unifies the way we handle line numbers in the JIT and Interpreter. Remove the now unused lineNumberMapping code and data. Change-Id: I1d60b1fbb77e70b531fa73d93410683e84dd1e3c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index fbf32e106a..b498581249 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -185,6 +185,7 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code
const uchar *exceptionHandler = 0;
+ context->lineNumber = -1;
QV4::ExecutionEngine *engine = context->engine;
#ifdef DO_TRACE_INSTR
@@ -192,7 +193,6 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code
#endif // DO_TRACE_INSTR
QV4::StringValue * const runtimeStrings = context->compilationUnit->runtimeStrings;
- context->interpreterInstructionPointer = &code;
// setup lookup scopes
int scopeDepth = 0;
@@ -661,9 +661,14 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code
MOTH_END_INSTR(Ret)
MOTH_BEGIN_INSTR(Debug)
+ context->lineNumber = instr.lineNumber;
QV4::Debugging::Debugger *debugger = context->engine->debugger;
if (debugger && debugger->pauseAtNextOpportunity())
- debugger->maybeBreakAtInstruction(instr.lineNumber);
+ debugger->maybeBreakAtInstruction();
+ MOTH_END_INSTR(Debug)
+
+ MOTH_BEGIN_INSTR(Line)
+ context->lineNumber = instr.lineNumber;
MOTH_END_INSTR(Debug)
MOTH_BEGIN_INSTR(LoadThis)