From ef5d5a989a344ba812a91b365cd54ace65f27f26 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 3 Aug 2017 08:57:03 +0200 Subject: Get rid of the compilation unit related members in ExecutionContext And change the signature for VME::exec to take the QV4::Function that should be executed. This is in preparation to being able to run functions that will not need to allocate an execution context on their own. Change-Id: I34538a8723006f4ec24583805e88a66e750100c3 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4lookup.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/qml/jsruntime/qv4lookup.cpp') diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp index d943ae1340..a576da0ea7 100644 --- a/src/qml/jsruntime/qv4lookup.cpp +++ b/src/qml/jsruntime/qv4lookup.cpp @@ -49,7 +49,7 @@ using namespace QV4; ReturnedValue Lookup::lookup(const Value &thisObject, Object *o, PropertyAttributes *attrs) { ExecutionEngine *engine = o->engine(); - Identifier *name = engine->current->compilationUnit->runtimeStrings[nameIndex]->identifier; + Identifier *name = engine->current->v4Function->compilationUnit->runtimeStrings[nameIndex]->identifier; int i = 0; Heap::Object *obj = o->d(); while (i < Size && obj) { @@ -85,7 +85,7 @@ ReturnedValue Lookup::lookup(const Object *thisObject, PropertyAttributes *attrs { Heap::Object *obj = thisObject->d(); ExecutionEngine *engine = thisObject->engine(); - Identifier *name = engine->current->compilationUnit->runtimeStrings[nameIndex]->identifier; + Identifier *name = engine->current->v4Function->compilationUnit->runtimeStrings[nameIndex]->identifier; int i = 0; while (i < Size && obj) { classList[i] = obj->internalClass; @@ -267,7 +267,7 @@ ReturnedValue Lookup::getterGeneric(Lookup *l, ExecutionEngine *engine, const Va Q_ASSERT(object.isString()); proto = engine->stringPrototype(); Scope scope(engine); - ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, engine->current->v4Function->compilationUnit->runtimeStrings[l->nameIndex]); if (name->equals(engine->id_length())) { // special case, as the property is on the object itself l->getter = stringLengthGetter; @@ -368,7 +368,7 @@ ReturnedValue Lookup::getterFallback(Lookup *l, ExecutionEngine *engine, const V QV4::ScopedObject o(scope, object.toObject(scope.engine)); if (!o) return Encode::undefined(); - ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, engine->current->v4Function->compilationUnit->runtimeStrings[l->nameIndex]); return o->get(name); } @@ -719,7 +719,7 @@ ReturnedValue Lookup::globalGetterGeneric(Lookup *l, ExecutionEngine *engine) } } Scope scope(engine); - ScopedString n(scope, engine->current->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString n(scope, engine->current->v4Function->compilationUnit->runtimeStrings[l->nameIndex]); return engine->throwReferenceError(n); } @@ -839,7 +839,7 @@ void Lookup::setterGeneric(Lookup *l, ExecutionEngine *engine, Value &object, co o = RuntimeHelpers::convertToObject(scope.engine, object); if (!o) // type error return; - ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, engine->current->v4Function->compilationUnit->runtimeStrings[l->nameIndex]); o->put(name, value); return; } @@ -870,7 +870,7 @@ void Lookup::setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, c QV4::Scope scope(engine); QV4::ScopedObject o(scope, object.toObject(scope.engine)); if (o) { - ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, engine->current->v4Function->compilationUnit->runtimeStrings[l->nameIndex]); o->put(name, value); } } -- cgit v1.2.3