aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-06-29 16:05:12 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-07-15 10:32:45 +0000
commit96cc0d7b4cd4de6a4a96af5a5174a4bc9bb4e5cd (patch)
tree8869954478f6eecfc1814b8632fb76943f371c67 /src/qml/jsruntime/qv4internalclass.cpp
parent0c43995e9427979fc046fe11366b44dc64ea6612 (diff)
QML: Allow for inlining InternalClass::find
This method is used in ExecutionEngine::getProperty, which is called quite often. Change-Id: Ide49d158005ef1d9f51d1e734cf9e3b19f52cf26 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass.cpp')
-rw-r--r--src/qml/jsruntime/qv4internalclass.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp
index 9660a5e76d..f46f581168 100644
--- a/src/qml/jsruntime/qv4internalclass.cpp
+++ b/src/qml/jsruntime/qv4internalclass.cpp
@@ -101,20 +101,6 @@ void PropertyHash::addEntry(const PropertyHash::Entry &entry, int classSize)
++d->size;
}
-uint PropertyHash::lookup(const Identifier *identifier) const
-{
- Q_ASSERT(d->entries);
-
- uint idx = identifier->hashValue % d->alloc;
- while (1) {
- if (d->entries[idx].identifier == identifier)
- return d->entries[idx].index;
- if (!d->entries[idx].identifier)
- return UINT_MAX;
- ++idx;
- idx %= d->alloc;
- }
-}
InternalClass::InternalClass(ExecutionEngine *engine)
: engine(engine)
@@ -360,18 +346,6 @@ void InternalClass::removeMember(Object *object, Identifier *id)
Q_ASSERT(t.lookup);
}
-uint InternalClass::find(const String *string)
-{
- engine->identifierTable->identifier(string);
- const Identifier *id = string->d()->identifier;
-
- uint index = propertyTable.lookup(id);
- if (index < size)
- return index;
-
- return UINT_MAX;
-}
-
uint InternalClass::find(const Identifier *id)
{
uint index = propertyTable.lookup(id);