diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 13:44:56 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-15 18:46:57 +0000 |
commit | 14111d693b0570949611c2d656584f17067a9ca5 (patch) | |
tree | 5ed3dfd9a5811bedb1251adedbfa3f2a51ad54b5 | |
parent | 996e54602a05649e3a84a505b439742809172d6f (diff) |
Speed up Object::internalGet()
There's no need for a scope here.
Change-Id: I7e4ed199df632293b6a010c1fa7662a5446b73ee
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 70f6341ac9..97296eb847 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -696,14 +696,13 @@ ReturnedValue Object::internalGet(String *name, bool *hasProperty) const name->makeIdentifier(); Identifier *id = name->identifier(); - Scope scope(engine()); - ScopedObject o(scope, this); + Heap::Object *o = d(); while (o) { - uint idx = o->internalClass()->find(id); + uint idx = o->internalClass->find(id); if (idx < UINT_MAX) { if (hasProperty) *hasProperty = true; - return getValue(*o->propertyData(idx), o->internalClass()->propertyData.at(idx)); + return getValue(*o->propertyData(idx), o->internalClass->propertyData.at(idx)); } o = o->prototype(); |