aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-02-06 15:05:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-07 10:44:30 +0100
commitaaa8257d988f10f8a6f92d6e687d9aaf678aa05c (patch)
tree73fee6efd269ef1cc8ccabd44ccce893b21331e0 /src/qml/compiler/qv4isel_moth.cpp
parentcd3736db10a8105d8dca09327b6efb139ce2ed1b (diff)
Specialize CJump into JumpEq and JumpNe
This avoids the bool invert in the instruction stream, and some additional code in the VME. Change-Id: I0ea675a2e3d07c1b8c5234b888d8d9683bcee330 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index 79077b6797..df102af73b 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -918,16 +918,16 @@ void InstructionSelection::visitCJump(V4IR::CJump *s)
Q_UNIMPLEMENTED();
}
- Instruction::CJump jump;
- jump.offset = 0;
- jump.condition = condition;
-
if (s->iftrue == _nextBlock) {
- jump.invert = true;
+ Instruction::JumpNe jump;
+ jump.offset = 0;
+ jump.condition = condition;
ptrdiff_t falseLoc = addInstruction(jump) + (((const char *)&jump.offset) - ((const char *)&jump));
_patches[s->iffalse].append(falseLoc);
} else {
- jump.invert = false;
+ Instruction::JumpEq jump;
+ jump.offset = 0;
+ jump.condition = condition;
ptrdiff_t trueLoc = addInstruction(jump) + (((const char *)&jump.offset) - ((const char *)&jump));
_patches[s->iftrue].append(trueLoc);