aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-11 12:46:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:12 +0200
commitd642438b7641ea2ea5416b59327c8f3baf531aa7 (patch)
treeee1ae1cbd24c16deb237ebe3b87a2b8d24ea86c4 /src/qml/jsruntime/qv4script.cpp
parent08582091059d8ba805487eae5277bc9abdc3d4de (diff)
Change calling convention in JIT to use ReturnedValue
This simplifies the masm backend as well and should be faster. Change-Id: I64ad5d9ee1b6caca950471e3aec4ef19d7503e62 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index e2a4054ea4..23d84a8b47 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -125,12 +125,13 @@ DEFINE_MANAGED_VTABLE(CompilationUnitHolder);
Value QmlBindingWrapper::call(Managed *that, CallData *)
{
ExecutionEngine *engine = that->engine();
+ ValueScope scope(engine);
QmlBindingWrapper *This = static_cast<QmlBindingWrapper *>(that);
CallContext *ctx = This->qmlContext;
std::fill(ctx->locals, ctx->locals + ctx->function->varCount, Value::undefinedValue());
engine->pushContext(ctx);
- Value result = This->function->code(ctx, This->function->codeData);
+ ScopedValue result(scope, This->function->code(ctx, This->function->codeData));
engine->popContext();
return result;
@@ -211,6 +212,7 @@ Value Script::run()
return Value::undefinedValue();
QV4::ExecutionEngine *engine = scope->engine;
+ QV4::ValueScope valueScope(engine);
if (qml.isEmpty()) {
TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction);
@@ -227,7 +229,7 @@ Value Script::run()
scope->compiledFunction = vmFunction->compiledFunction;
scope->runtimeStrings = vmFunction->compilationUnit->runtimeStrings;
- QV4::Value result;
+ QV4::ScopedValue result(valueScope);
try {
result = vmFunction->code(scope, vmFunction->codeData);
} catch (Exception &e) {