diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-24 15:31:46 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-15 07:37:16 +0000 |
commit | 3a8d6123d1947d18db15bf8b30f59cdea7e31380 (patch) | |
tree | 7ad4ca820c395099e938fd9dacffbe27728d24d7 /src/qml/jsruntime/qv4debugging.cpp | |
parent | fb059f697a128f87ceecf5ddff1dd735ae78db20 (diff) |
Store the stack of executioncontext's on the JS stack
This saves one pointer per allocated execution context.
Now every execution context that is pushed, allocates two
Values on the js stack. One contains the context itself, the
other one the offset to the parent context.
Things are a bit tricky for with and catch scopes, as those
are called from the generated code, and can't open a Scope
anymore. In addition, all methods iterating over the js
stack frames need to work with ExecutionContext pointers,
not ScopedContext's.
Change-Id: I6f3013749d4e73d2fac37973b976ba6029686b82
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4debugging.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4debugging.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp index 1833215c42..8a60a81b93 100644 --- a/src/qml/jsruntime/qv4debugging.cpp +++ b/src/qml/jsruntime/qv4debugging.cpp @@ -249,7 +249,7 @@ void Debugger::leavingFunction(const ReturnedValue &retVal) QMutexLocker locker(&m_lock); if (m_stepping != NotStepping && m_currentContext.asManaged()->d() == m_engine->currentContext()) { - m_currentContext.set(m_engine, m_engine->currentContext()->parent); + m_currentContext.set(m_engine, *m_engine->parentContext(m_engine->currentExecutionContext)); m_stepping = StepOver; m_returnedValue.set(m_engine, retVal); } |