summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4debugging.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/qv4debugging.cpp
parent4c4bddb0254acbc53b80e804bbbc26cfdd4e87a1 (diff)
downloadqtdeclarative-245f5ce7bb194438fc643e5c928382f47556e2f2.tar.gz
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/qv4debugging.cpp')
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 7d19c7804e..92273417a9 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -205,13 +205,13 @@ void Debugger::setBreakOnThrow(bool onoff)
m_breakOnThrow = onoff;
}
-Debugger::ExecutionState Debugger::currentExecutionState(int lineNumber) const
+Debugger::ExecutionState Debugger::currentExecutionState() const
{
// ### Locking
ExecutionState state;
state.function = getFunction();
state.fileName = state.function->sourceFile();
- state.lineNumber = lineNumber;
+ state.lineNumber = engine()->currentContext()->lineNumber;
return state;
}
@@ -445,7 +445,7 @@ QVector<ExecutionContext::ContextType> Debugger::getScopeTypes(int frame) const
return types;
}
-void Debugger::maybeBreakAtInstruction(int lineNumber)
+void Debugger::maybeBreakAtInstruction()
{
if (m_runningJob) // do not re-enter when we're doing a job for the debugger.
return;
@@ -454,7 +454,7 @@ void Debugger::maybeBreakAtInstruction(int lineNumber)
if (m_breakPoints.isEmpty())
return;
- ExecutionState state = currentExecutionState(lineNumber);
+ ExecutionState state = currentExecutionState();
if (m_gatherSources) {
m_gatherSources->run();