aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-10-05 11:02:36 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-10-06 12:56:11 +0000
commit55ecfd409ca6aa8018be8cc2697b27928fbd4cc2 (patch)
tree22f2eb3c976f0a305c37856d167f89fdca8667f8 /src/qml/compiler/qv4compileddata.cpp
parent080a5c705aa9c04a332c2f95a216853b098d9d6b (diff)
Simplify compilation unit tracking in the execution engine
Instead of collecting all compilation units in a hash, let's collect linked units in a doubly-linked lists that makes the removal at destruction time dramatically cheaper. Change-Id: I9fd59600d082be3566f605d90f14a86a58ac9296 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 34491a3a84..294eaa25f5 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -212,7 +212,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine)
void CompilationUnit::unlink()
{
if (engine)
- engine->compilationUnits.erase(engine->compilationUnits.find(this));
+ nextCompilationUnit.remove();
if (isRegisteredWithEngine) {
Q_ASSERT(data && propertyCaches.count() > 0 && propertyCaches.at(/*root object*/0));