aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4identifiertable_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-03-14 13:17:08 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-03-17 13:10:37 +0100
commit6b0178ef24ebfc621a6c14c3c0c5a11f2e58ac03 (patch)
treeaa7d6ca42165be14338dbe63e7c42bb788ba1142 /src/qml/jsruntime/qv4identifiertable_p.h
parent9caea013ceb221b5617c4940e7bb9ee9fecdd631 (diff)
IdentifierTable: Optimize property key lookup by QString
We only have to create QV4::String if the entry doesn't exist, yet. Also, make sure the identifier of a new QV4::String inserted for an array index is actually populated. Change-Id: I223d191905baea5e537f483a9b3aa3db26f891b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4identifiertable_p.h')
-rw-r--r--src/qml/jsruntime/qv4identifiertable_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h
index 6553ad6103..b2a9bc1195 100644
--- a/src/qml/jsruntime/qv4identifiertable_p.h
+++ b/src/qml/jsruntime/qv4identifiertable_p.h
@@ -109,6 +109,9 @@ public:
void removeIdentifierHash(IdentifierHashData *h) {
idHashes.remove(h);
}
+
+private:
+ Heap::String *resolveStringEntry(const QString &s, uint hash, uint subtype);
};
}