diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-28 14:02:06 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-20 07:39:32 +0100 |
commit | 4479bb58a4ae6c4520773201f41028ef1791bf73 (patch) | |
tree | 3d795542a7e4dadcc9b851f88bb2116ee9c3d8b6 /src/qml | |
parent | ed9db939b1fe5ea2f620a4992abdbc553fa3ac41 (diff) |
Store a Heap::EvalFunction pointer in the engine
Change-Id: I002eb8f94e168c9faf1ee3521170dfaf442af1a3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 170670fbfb..3d645404d3 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -436,7 +436,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) globalObject()->defineReadonlyProperty(QStringLiteral("Infinity"), Primitive::fromDouble(Q_INFINITY)); - evalFunction = Scoped<EvalFunction>(scope, memoryManager->alloc<EvalFunction>(global)); + evalFunction = memoryManager->alloc<EvalFunction>(global); globalObject()->defineDefaultProperty(QStringLiteral("eval"), (o = evalFunction)); globalObject()->defineDefaultProperty(QStringLiteral("parseInt"), GlobalFunctions::method_parseInt, 2); diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 03d471b5d3..4d02b4a51a 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -196,7 +196,7 @@ public: InternalClass *dataViewClass; InternalClass *typedArrayClasses[NTypedArrayTypes]; // TypedArray::NValues, avoid including the header here - EvalFunction *evalFunction; + Heap::EvalFunction *evalFunction; FunctionObject *thrower; Property *argumentsAccessors; diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 8044161b81..e1d8b19b65 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -910,7 +910,7 @@ ReturnedValue Runtime::callGlobalLookup(ExecutionEngine *engine, uint index, Cal return engine->throwTypeError(); ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[l->nameIndex]); - if (o.getPointer() == scope.engine->evalFunction && name->equals(scope.engine->id_eval)) + if (o->d() == scope.engine->evalFunction && name->equals(scope.engine->id_eval)) return static_cast<EvalFunction *>(o.getPointer())->evalCall(callData, true); return o->call(callData); @@ -943,7 +943,7 @@ ReturnedValue Runtime::callActivationProperty(ExecutionEngine *engine, int nameI return engine->throwTypeError(msg); } - if (o == scope.engine->evalFunction && name->equals(scope.engine->id_eval)) { + if (o->d() == scope.engine->evalFunction && name->equals(scope.engine->id_eval)) { return static_cast<EvalFunction *>(o)->evalCall(callData, true); } |