Changeset 51738 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- Dec 6, 2009, 2:09:55 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r51736 r51738 746 746 void JIT::emit_op_loop_if_false(Instruction* currentInstruction) 747 747 { 748 unsigned cond = currentInstruction[1].u.operand; 748 emitTimeoutCheck(); 749 749 750 unsigned target = currentInstruction[2].u.operand; 750 751 emitTimeoutCheck(); 752 753 emitLoad(cond, regT1, regT0); 754 755 Jump isTrue = branch32(Equal, regT1, Imm32(JSValue::TrueTag)); 756 addJump(branch32(Equal, regT1, Imm32(JSValue::FalseTag)), target); 757 758 Jump isNotInteger = branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag)); 759 Jump isTrue2 = branch32(NotEqual, regT0, Imm32(0)); 760 addJump(jump(), target); 761 762 if (supportsFloatingPoint()) { 763 isNotInteger.link(this); 764 765 addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag))); 766 767 zeroDouble(fpRegT0); 768 emitLoadDouble(cond, fpRegT1); 769 addJump(branchDouble(DoubleEqualOrUnordered, fpRegT0, fpRegT1), target); 770 } else 771 addSlowCase(isNotInteger); 772 773 isTrue.link(this); 774 isTrue2.link(this); 751 emitGetVirtualRegister(currentInstruction[1].u.operand, regT0); 752 753 addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target); 754 Jump isNonZero = emitJumpIfImmediateInteger(regT0); 755 756 addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target); 757 addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(true))))); 758 759 isNonZero.link(this); 760 RECORD_JUMP_TARGET(target); 775 761 } 776 762 … … 2300 2286 isZero.link(this); 2301 2287 }; 2288 2289 void JIT::emit_op_loop_if_false(Instruction* currentInstruction) 2290 { 2291 emitTimeoutCheck(); 2292 2293 unsigned target = currentInstruction[2].u.operand; 2294 emitGetVirtualRegister(currentInstruction[1].u.operand, regT0); 2295 2296 Jump isZero = branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))); 2297 addJump(emitJumpIfImmediateInteger(regT0), target); 2298 2299 addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))), target); 2300 addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(false))))); 2301 2302 isZero.link(this); 2303 }; 2304 2302 2305 void JIT::emit_op_resolve_base(Instruction* currentInstruction) 2303 2306 { … … 3058 3061 } 3059 3062 3063 void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 3064 { 3065 linkSlowCase(iter); 3066 JITStubCall stubCall(this, cti_op_jtrue); 3067 stubCall.addArgument(regT0); 3068 stubCall.call(); 3069 emitJumpSlowToHot(branchTest32(Zero, regT0), currentInstruction[2].u.operand); // inverted! 3070 } 3071 3060 3072 void JIT::emitSlow_op_not(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 3061 3073 {
Note:
See TracChangeset
for help on using the changeset viewer.