diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-11-21 10:00:45 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-23 15:05:22 +0000 |
commit | 1f5c79c59aa43e416778a2046e4121731b34bb6a (patch) | |
tree | 27dbc03f147d484e79c40b42c79abc2a2291655b /src/qml/compiler/qv4instr_moth_p.h | |
parent | 8df195c8765429652ccf31e9de9829bbae5ba5bb (diff) |
V4: Collapse LoadRegExp+StoreReg into MoveRegExp
LoadRegExp is nearly always followed by a store of the accumulator, so
change LoadRegExp to be MoveRegExp. This saves an instruction.
Change-Id: I5d47c5bf6ffd7f28247c328410872c3b229ca23c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index e0b013eb95..06cf34481c 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE #define INSTR_LoadScopedLocal(op) INSTRUCTION(op, LoadScopedLocal, 2, scope, index) #define INSTR_StoreScopedLocal(op) INSTRUCTION(op, StoreScopedLocal, 2, scope, index) #define INSTR_LoadRuntimeString(op) INSTRUCTION(op, LoadRuntimeString, 1, stringId) -#define INSTR_LoadRegExp(op) INSTRUCTION(op, LoadRegExp, 1, regExpId) +#define INSTR_MoveRegExp(op) INSTRUCTION(op, MoveRegExp, 2, regExpId, destReg) #define INSTR_LoadClosure(op) INSTRUCTION(op, LoadClosure, 1, value) #define INSTR_LoadName(op) INSTRUCTION(op, LoadName, 1, name) #define INSTR_LoadGlobalLookup(op) INSTRUCTION(op, LoadGlobalLookup, 1, index) @@ -205,7 +205,7 @@ QT_BEGIN_NAMESPACE F(LoadScopedLocal) \ F(StoreScopedLocal) \ F(LoadRuntimeString) \ - F(LoadRegExp) \ + F(MoveRegExp) \ F(LoadClosure) \ F(LoadName) \ F(LoadGlobalLookup) \ |