Not reviewed, build fix.
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Dec 2009 10:30:32 +0000 (10:30 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Dec 2009 10:30:32 +0000 (10:30 +0000)
Actually tested 64-bit *and* 32-bit build this time.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_if_false):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51739 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/jit/JITOpcodes.cpp

index 459f44d5f2d76635c3443be8d82a1b1fe38f07bf..7f50860536821d1e9290fbb9ef6da0446dfda329 100644 (file)
@@ -1,3 +1,12 @@
+2009-12-06  Maciej Stachowiak  <mjs@apple.com>
+
+        Not reviewed, build fix.
+
+        Actually tested 64-bit *and* 32-bit build this time.
+
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_loop_if_false):
+
 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
 
         Not reviewed, build fix.
index 45da600af44e37854988df0887c747530ff6fa25..059cddadd520d41d38d6b809b9991906d8ccc0e8 100644 (file)
@@ -745,19 +745,33 @@ void JIT::emitSlow_op_loop_if_true(Instruction* currentInstruction, Vector<SlowC
 
 void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
 {
+    unsigned cond = currentInstruction[1].u.operand;
+    unsigned target = currentInstruction[2].u.operand;
+
     emitTimeoutCheck();
 
-    unsigned target = currentInstruction[2].u.operand;
-    emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
+    emitLoad(cond, regT1, regT0);
 
-    addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target);
-    Jump isNonZero = emitJumpIfImmediateInteger(regT0);
+    Jump isTrue = branch32(Equal, regT1, Imm32(JSValue::TrueTag));
+    addJump(branch32(Equal, regT1, Imm32(JSValue::FalseTag)), target);
 
-    addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target);
-    addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))));
+    Jump isNotInteger = branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag));
+    Jump isTrue2 = branch32(NotEqual, regT0, Imm32(0));
+    addJump(jump(), target);
 
-    isNonZero.link(this);
-    RECORD_JUMP_TARGET(target);
+    if (supportsFloatingPoint()) {
+        isNotInteger.link(this);
+
+        addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag)));
+
+        zeroDouble(fpRegT0);
+        emitLoadDouble(cond, fpRegT1);
+        addJump(branchDouble(DoubleEqualOrUnordered, fpRegT0, fpRegT1), target);
+    } else
+        addSlowCase(isNotInteger);
+
+    isTrue.link(this);
+    isTrue2.link(this);
 }
 
 void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)