aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-31 14:58:14 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 23:02:23 +0100
commit3408bd9d08630687515401cfaadaf818912d72d7 (patch)
treebe83f9c1b3ba7508267bf9e99b6a2c8eb6830892 /src/qml/compiler/qv4instr_moth_p.h
parent74cc0db2ce84ff2c54a9650d475a1d65adc45a94 (diff)
Use lookups for get/setElement in the interpreter
Significantly speeds up crypto.js Change-Id: Icd3d59bea3fe4427e93e9e10e3526178e8de859c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index e010e6e909..293452cf47 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -60,7 +60,9 @@ QT_BEGIN_NAMESPACE
F(GetGlobalLookup, getGlobalLookup) \
F(StoreName, storeName) \
F(LoadElement, loadElement) \
+ F(LoadElementLookup, loadElementLookup) \
F(StoreElement, storeElement) \
+ F(StoreElementLookup, storeElementLookup) \
F(LoadProperty, loadProperty) \
F(GetLookup, getLookup) \
F(StoreProperty, storeProperty) \
@@ -322,12 +324,26 @@ union Instr
Param index;
Param result;
};
+ struct instr_loadElementLookup {
+ MOTH_INSTR_HEADER
+ uint lookup;
+ Param base;
+ Param index;
+ Param result;
+ };
struct instr_storeElement {
MOTH_INSTR_HEADER
Param base;
Param index;
Param source;
};
+ struct instr_storeElementLookup {
+ MOTH_INSTR_HEADER
+ uint lookup;
+ Param base;
+ Param index;
+ Param source;
+ };
struct instr_push {
MOTH_INSTR_HEADER
quint32 value;
@@ -696,7 +712,9 @@ union Instr
instr_getGlobalLookup getGlobalLookup;
instr_storeName storeName;
instr_loadElement loadElement;
+ instr_loadElementLookup loadElementLookup;
instr_storeElement storeElement;
+ instr_storeElementLookup storeElementLookup;
instr_loadProperty loadProperty;
instr_getLookup getLookup;
instr_loadQObjectProperty loadQObjectProperty;