aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-03 14:20:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 16:55:12 +0100
commit4c4bddb0254acbc53b80e804bbbc26cfdd4e87a1 (patch)
tree9f2734f313f8feb7abb8355e1fed86b63a71f5d9 /src/qml/jsruntime/qv4vme_moth.cpp
parent99efe4309379482fce5c231885883e359bf85290 (diff)
Simplify our breakpoint handling
Only store a Hash of break points in the debugger, instead of the involved logic that currently adds and removes break points. Add the current line number to the Debug statements in the interpreter, and pass them on to the debugger for checking whether we should really break. This adds a slight additional overhead to running inside the debugger, but greatly simplifies the logic and doesn't require modifying the bytecode anymore. This in turn opens up the possibility to run the debugger on JIT generated code later on. Change-Id: If2a3ae8f8d08b69a3a704cbbe0a84000f917a32e 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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index a657b34be5..fbf32e106a 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -662,8 +662,8 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code
MOTH_BEGIN_INSTR(Debug)
QV4::Debugging::Debugger *debugger = context->engine->debugger;
- if (debugger && (instr.breakPoint || debugger->pauseAtNextOpportunity()))
- debugger->maybeBreakAtInstruction(code, instr.breakPoint);
+ if (debugger && debugger->pauseAtNextOpportunity())
+ debugger->maybeBreakAtInstruction(instr.lineNumber);
MOTH_END_INSTR(Debug)
MOTH_BEGIN_INSTR(LoadThis)