aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_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/jsruntime/qv4vme_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/jsruntime/qv4vme_moth.cpp')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index adf43812cf..59cfc5f075 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -652,9 +652,9 @@ QV4::ReturnedValue VME::exec(const FunctionObject *fo, const Value *thisObject,
acc = function->compilationUnit->runtimeStrings[stringId]->asReturnedValue();
MOTH_END_INSTR(LoadRuntimeString)
- MOTH_BEGIN_INSTR(LoadRegExp)
- acc = Runtime::method_regexpLiteral(engine, regExpId);
- MOTH_END_INSTR(LoadRegExp)
+ MOTH_BEGIN_INSTR(MoveRegExp)
+ STACK_VALUE(destReg) = Runtime::method_regexpLiteral(engine, regExpId);
+ MOTH_END_INSTR(MoveRegExp)
MOTH_BEGIN_INSTR(LoadClosure)
acc = Runtime::method_closure(engine, value);