aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-11-21 10:00:45 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-23 15:05:22 +0000
commit1f5c79c59aa43e416778a2046e4121731b34bb6a (patch)
tree27dbc03f147d484e79c40b42c79abc2a2291655b /src/qml/compiler/qv4instr_moth.cpp
parent8df195c8765429652ccf31e9de9829bbae5ba5bb (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.cpp')
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 9cfde99e6b..3fc8882937 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -261,9 +261,9 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st
d << stringId;
MOTH_END_INSTR(LoadRuntimeString)
- MOTH_BEGIN_INSTR(LoadRegExp)
- d << regExpId;
- MOTH_END_INSTR(LoadRegExp)
+ MOTH_BEGIN_INSTR(MoveRegExp)
+ d << dumpRegister(destReg, nFormals) << ", " <<regExpId;
+ MOTH_END_INSTR(MoveRegExp)
MOTH_BEGIN_INSTR(LoadClosure)
d << value;