diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-29 11:59:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-31 21:49:21 +0100 |
commit | bbc36ebbc38de276b85947b65d89897bf430add5 (patch) | |
tree | 31c4a4754210fe3e97391c9dffdc31e105885390 /src/qml/compiler/qv4instr_moth_p.h | |
parent | 7d850df7e68e0eab0f07d5f7a03050175080fb81 (diff) |
Speed up lookups of imported scripts
The QQmlContextData stores the JS objects of imported scripts in a
QList<PersistentValue>. Instead of indexing into that list, this patch changes
ctxt->importedScripts to be a JavaScript array, that in the IR we can index via
subscript.
Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index d99e0fee0d..854b9a3a8d 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE F(SubNumberParams, subNumberParams) \ F(LoadThis, loadThis) \ F(LoadQmlIdObject, loadQmlIdObject) \ - F(LoadQmlImportedScript, loadQmlImportedScript) \ + F(LoadQmlImportedScripts, loadQmlImportedScripts) \ F(LoadQmlContextObject, loadQmlContextObject) \ F(LoadQmlScopeObject, loadQmlScopeObject) @@ -645,10 +645,9 @@ union Instr Param result; int id; }; - struct instr_loadQmlImportedScript { + struct instr_loadQmlImportedScripts { MOTH_INSTR_HEADER Param result; - int index; }; struct instr_loadQmlContextObject { MOTH_INSTR_HEADER @@ -735,7 +734,7 @@ union Instr instr_subNumberParams subNumberParams; instr_loadThis loadThis; instr_loadQmlIdObject loadQmlIdObject; - instr_loadQmlImportedScript loadQmlImportedScript; + instr_loadQmlImportedScripts loadQmlImportedScripts; instr_loadQmlContextObject loadQmlContextObject; instr_loadQmlScopeObject loadQmlScopeObject; |