aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-06 20:34:07 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-08 18:59:34 +0000
commit60174306e0e499140757443cf4d3f7f54c3c17b7 (patch)
tree8cb643eb77310fb094a96f71560536b46188bbf0 /src
parent3198a246993fb09d12b788f7d1deac9ea094bbba (diff)
Optimize JumpStrict(Not)Equal
Change-Id: I4b2c6e422333cde6c7d98bf52c96410579579c35 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 052eea7b55..cc7a5fa6f2 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -870,13 +870,17 @@ QV4::ReturnedValue VME::exec(Function *function)
MOTH_END_INSTR(CmpJmpLe)
MOTH_BEGIN_INSTR(JumpStrictEqual)
- if (RuntimeHelpers::strictEqual(STACK_VALUE(instr.lhs), accumulator))
+ if (STACK_VALUE(instr.lhs).rawValue() == accumulator.rawValue() && !accumulator.isNaN())
+ code = reinterpret_cast<const uchar *>(&instr.offset) + instr.offset;
+ else if (RuntimeHelpers::strictEqual(STACK_VALUE(instr.lhs), accumulator))
code = reinterpret_cast<const uchar *>(&instr.offset) + instr.offset;
MOTH_END_INSTR(JumpStrictEqual)
MOTH_BEGIN_INSTR(JumpStrictNotEqual)
- if (!RuntimeHelpers::strictEqual(STACK_VALUE(instr.lhs), accumulator))
- code = reinterpret_cast<const uchar *>(&instr.offset) + instr.offset;
+ if (STACK_VALUE(instr.lhs).rawValue() != accumulator.rawValue()) {
+ if (!RuntimeHelpers::strictEqual(STACK_VALUE(instr.lhs), accumulator))
+ code = reinterpret_cast<const uchar *>(&instr.offset) + instr.offset;
+ }
MOTH_END_INSTR(JumpStrictNotEqual)
MOTH_BEGIN_INSTR(UNot)