Title: [96436] trunk/Source/_javascript_Core
- Revision
- 96436
- Author
- barraclo...@apple.com
- Date
- 2011-09-30 16:05:59 -0700 (Fri, 30 Sep 2011)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (96435 => 96436)
--- trunk/Source/_javascript_Core/ChangeLog 2011-09-30 23:01:23 UTC (rev 96435)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-09-30 23:05:59 UTC (rev 96436)
@@ -1,3 +1,21 @@
+2011-09-30 Gavin Barraclough <barraclo...@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 <oli...@apple.com>
Need a sensible GGC policy
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (96435 => 96436)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-09-30 23:01:23 UTC (rev 96435)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-09-30 23:05:59 UTC (rev 96436)
@@ -1270,7 +1270,7 @@
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());
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (96435 => 96436)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2011-09-30 23:01:23 UTC (rev 96435)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2011-09-30 23:05:59 UTC (rev 96436)
@@ -1363,8 +1363,8 @@
}
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());
@@ -1385,29 +1385,6 @@
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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes