diff options
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4lookup.cpp | 71 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4lookup_p.h | 10 |
3 files changed, 0 insertions, 86 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 3a1fd7fce5..d889e634c0 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -150,11 +150,6 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) l->setter = QV4::Lookup::setterGeneric; else if (type == CompiledData::Lookup::Type_GlobalGetter) l->globalGetter = QV4::Lookup::globalGetterGeneric; - - for (int j = 0; j < QV4::Lookup::Size; ++j) - l->classList[j] = 0; - l->level = -1; - l->index = UINT_MAX; l->nameIndex = compiledLookups[i].nameIndex; } } diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp index 73ae4bf410..52ab03cd94 100644 --- a/src/qml/jsruntime/qv4lookup.cpp +++ b/src/qml/jsruntime/qv4lookup.cpp @@ -47,77 +47,6 @@ QT_BEGIN_NAMESPACE using namespace QV4; -ReturnedValue Lookup::lookup(const Value &thisObject, Object *o, PropertyAttributes *attrs) -{ - ExecutionEngine *engine = o->engine(); - Identifier *name = engine->identifierTable->identifier(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]); - int i = 0; - Heap::Object *obj = o->d(); - while (i < Size && obj) { - classList[i] = obj->internalClass; - - index = obj->internalClass->find(name); - if (index != UINT_MAX) { - level = i; - *attrs = obj->internalClass->propertyData.at(index); - const Value *v = obj->propertyData(index); - return !attrs->isAccessor() ? v->asReturnedValue() : Object::getValue(thisObject, *v, *attrs); - } - - obj = obj->prototype(); - ++i; - } - level = Size; - - while (obj) { - index = obj->internalClass->find(name); - if (index != UINT_MAX) { - *attrs = obj->internalClass->propertyData.at(index); - const Value *v = obj->propertyData(index); - return !attrs->isAccessor() ? v->asReturnedValue() : Object::getValue(thisObject, *v, *attrs); - } - - obj = obj->prototype(); - } - return Primitive::emptyValue().asReturnedValue(); -} - -ReturnedValue Lookup::lookup(const Object *thisObject, PropertyAttributes *attrs) -{ - Heap::Object *obj = thisObject->d(); - ExecutionEngine *engine = thisObject->engine(); - Identifier *name = engine->identifierTable->identifier(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]); - - int i = 0; - while (i < Size && obj) { - classList[i] = obj->internalClass; - - index = obj->internalClass->find(name); - if (index != UINT_MAX) { - level = i; - *attrs = obj->internalClass->propertyData.at(index); - const Value *v = obj->propertyData(index); - return !attrs->isAccessor() ? v->asReturnedValue() : thisObject->getValue(*v, *attrs); - } - - obj = obj->prototype(); - ++i; - } - level = Size; - - while (obj) { - index = obj->internalClass->find(name); - if (index != UINT_MAX) { - *attrs = obj->internalClass->propertyData.at(index); - const Value *v = obj->propertyData(index); - return !attrs->isAccessor() ? v->asReturnedValue() : thisObject->getValue(*v, *attrs); - } - - obj = obj->prototype(); - } - return Primitive::emptyValue().asReturnedValue(); -} - void Lookup::resolveProtoGetter(Identifier *name, const Heap::Object *proto) { while (proto) { diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index 5c58d2f669..5f507733fd 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -104,14 +104,7 @@ struct Lookup { int icIdentifier; int offset; } insertionLookup; - - InternalClass *classList[Size]; - }; - union { - int level; - uint index2; }; - uint index; uint nameIndex; ReturnedValue resolveGetter(ExecutionEngine *engine, const Object *object); @@ -151,9 +144,6 @@ struct Lookup { static bool setter0setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); static bool setterInsert(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); static bool arrayLengthSetter(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - - ReturnedValue lookup(const Value &thisObject, Object *obj, PropertyAttributes *attrs); - ReturnedValue lookup(const Object *obj, PropertyAttributes *attrs); }; Q_STATIC_ASSERT(std::is_standard_layout<Lookup>::value); |