+2011-09-30 Gavin Barraclough <barraclough@apple.com>
+
+ DFG JIT, Branch on integer can always be a 32-bit compare.
+ https://bugs.webkit.org/show_bug.cgi?id=69174
+
+ Reviewed by Sam Weinig.
+
+ if (shouldSpeculateInteger(node.child1()) && !isStrictInt32(node.child1())),
+ the JSVALUE64 JIT will currently compare all 64bits in the register, but in
+ these cases the DataFormat is always a JS boxed integer. In these cases we
+ can just compare the low 32bits anyway - no need to check the tag.
+ This allows the code to be unified with the JSVALUE32_64 JIT.
+
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+
2011-09-30 Oliver Hunt <oliver@apple.com>
Need a sensible GGC policy
case Branch:
if (isStrictInt32(node.child1()) || shouldSpeculateInteger(node.child1())) {
- SpeculateStrictInt32Operand op(this, node.child1());
+ SpeculateIntegerOperand op(this, node.child1());
BlockIndex taken = m_jit.graph().blockIndexForBytecodeOffset(node.takenBytecodeOffset());
BlockIndex notTaken = m_jit.graph().blockIndexForBytecodeOffset(node.notTakenBytecodeOffset());
}
case Branch:
- if (isStrictInt32(node.child1())) {
- SpeculateStrictInt32Operand op(this, node.child1());
+ if (isStrictInt32(node.child1()) || shouldSpeculateInteger(node.child1())) {
+ SpeculateIntegerOperand op(this, node.child1());
BlockIndex taken = m_jit.graph().blockIndexForBytecodeOffset(node.takenBytecodeOffset());
BlockIndex notTaken = m_jit.graph().blockIndexForBytecodeOffset(node.notTakenBytecodeOffset());
noResult(m_compileIndex);
break;
}
- if (shouldSpeculateInteger(node.child1())) {
- SpeculateIntegerOperand op(this, node.child1());
-
- BlockIndex taken = m_jit.graph().blockIndexForBytecodeOffset(node.takenBytecodeOffset());
- BlockIndex notTaken = m_jit.graph().blockIndexForBytecodeOffset(node.notTakenBytecodeOffset());
-
- MacroAssembler::RelationalCondition condition = MacroAssembler::NotEqual;
-
- if (taken == (m_block + 1)) {
- condition = MacroAssembler::Equal;
- BlockIndex tmp = taken;
- taken = notTaken;
- notTaken = tmp;
- }
-
- addBranch(m_jit.branchPtr(condition, op.gpr(), GPRInfo::tagTypeNumberRegister), taken);
-
- if (notTaken != (m_block + 1))
- addBranch(m_jit.jump(), notTaken);
-
- noResult(m_compileIndex);
- break;
- }
emitBranch(node);
break;