aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_moth.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-01 15:45:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 11:41:23 +0200
commit9c82c105a1886473ca144b802ce9f5bec01e35e8 (patch)
tree2caeb5945e2b60f49ba046ec50a45c0bec4f2f7d /src/qml/jsruntime/qv4vme_moth.cpp
parent0ef673efe8bf381e1aa0202752deac27e86ada53 (diff)
V4: Fix SSA decomposition when no regalloc is used.
Add scheduling for moves generated by removing phi nodes by re-using the MoveMapping class from the register allocator. This change applies to both the JIT when no register allocator is used, and the interpreter. Change-Id: I38eac5b13759c7790132d1ef07fa17fcb53187e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index a2aca79bcb..caeeeb4672 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -258,6 +258,10 @@ QV4::Value VME::run(QV4::ExecutionContext *context, const uchar *&code,
VALUE(instr.result) = VALUE(instr.source);
MOTH_END_INSTR(MoveTemp)
+ MOTH_BEGIN_INSTR(SwapTemps)
+ qSwap(VALUE(instr.left), VALUE(instr.right));
+ MOTH_END_INSTR(MoveTemp)
+
MOTH_BEGIN_INSTR(LoadValue)
// TRACE(value, "%s", instr.value.toString(context)->toQString().toUtf8().constData());
VALUE(instr.result) = VALUE(instr.value);