diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-30 14:38:01 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-09-01 12:30:30 +0000 |
commit | 50828bc6ed9112956170a68dffe72431a21fddd9 (patch) | |
tree | 60cd60e614516fb77fe27fe7dc9a4f453b6e2b31 /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | 85fe2814a1397a17804d8eace4a70e5b7df854b6 (diff) |
Use the context member in CallData
Store the current context in the context member instead of
passing it along as arguments.
Change-Id: If3dd0d32eddb2a02bcbf65fe6e8d15142403170e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 7c389e2dd3..ad3fd0bce1 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -489,7 +489,7 @@ static bool compareEqualInt(Value &accumulator, Value lhs, int rhs) } while (false) -QV4::ReturnedValue VME::exec(CallData *callData, Heap::ExecutionContext *context, QV4::Function *function) +QV4::ReturnedValue VME::exec(CallData *callData, QV4::Function *function) { qt_v4ResolvePendingBreakpointsHook(); @@ -514,7 +514,7 @@ QV4::ReturnedValue VME::exec(CallData *callData, Heap::ExecutionContext *context stack = engine->jsAlloca(function->compiledFunction->nRegisters + sizeof(JSStackFrame)/sizeof(QV4::Value)); frame.jsFrame = reinterpret_cast<JSStackFrame *>(stack); - frame.jsFrame->context = context; + frame.jsFrame->context = callData->context; QV4::Value &accumulator = frame.jsFrame->accumulator; QV4::ReturnedValue acc = Encode::undefined(); @@ -1287,8 +1287,9 @@ functionExit: engine->jsStackTop = jsStackTop; if (function->hasQmlDependencies) { - Q_ASSERT(context->type == Heap::ExecutionContext::Type_QmlContext); - QQmlPropertyCapture::registerQmlDependencies(static_cast<Heap::QmlContext *>(context), engine, function->compiledFunction); + Heap::QmlContext *c = static_cast<Heap::QmlContext *>(callData->context.m()); + Q_ASSERT(c->type == Heap::ExecutionContext::Type_QmlContext); + QQmlPropertyCapture::registerQmlDependencies(c, engine, function->compiledFunction); } return ACC.asReturnedValue(); |