summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4globalobject.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/qv4globalobject.cpp
parent08582091059d8ba805487eae5277bc9abdc3d4de (diff)
downloadqtdeclarative-d642438b7641ea2ea5416b59327c8f3baf531aa7.tar.gz
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/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index 9764a7930f..6176893d68 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -362,6 +362,7 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d
ExecutionContext *parentContext = engine()->current;
ExecutionEngine *engine = parentContext->engine;
ExecutionContext *ctx = parentContext;
+ ValueScope scope(ctx);
if (!directCall) {
// the context for eval should be the global scope, so we fake a root
@@ -412,7 +413,7 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d
ctx->compiledFunction = function->compiledFunction;
ctx->runtimeStrings = function->compilationUnit->runtimeStrings;
- Value result = Value::undefinedValue();
+ ScopedValue result(scope);
try {
result = function->code(ctx, function->codeData);
} catch (Exception &ex) {