Changeset 89957 in webkit
- Timestamp:
- Jun 28, 2011, 2:06:49 PM (15 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGSpeculativeJIT.cpp (modified) (5 diffs)
-
dfg/DFGSpeculativeJIT.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r89956 r89957 1 2011-06-28 Gavin Barraclough <barraclough@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=63561 6 DFG JIT - don't always assume integer in relational compare 7 8 If neither operand is known integer, or either is in double representation, 9 then at least use a function call (don't bail off the speculative path). 10 11 * dfg/DFGSpeculativeJIT.cpp: 12 (JSC::DFG::SpeculativeJIT::compilePeepHoleCall): 13 (JSC::DFG::SpeculativeJIT::compile): 14 * dfg/DFGSpeculativeJIT.h: 15 (JSC::DFG::SpeculativeJIT::isDataFormatDouble): 16 (JSC::DFG::SpeculativeJIT::compareIsInteger): 17 1 18 2011-06-28 Oliver Hunt <oliver@apple.com> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r89882 r89957 268 268 } 269 269 270 void SpeculativeJIT::compilePeepHole Eq(Node& node, NodeIndex branchNodeIndex)270 void SpeculativeJIT::compilePeepHoleCall(Node& node, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ operation) 271 271 { 272 272 Node& branchNode = m_jit.graph()[branchNodeIndex]; … … 291 291 292 292 GPRResult result(this); 293 callOperation(operation CompareEq, result.gpr(), op1GPR, op2GPR);293 callOperation(operation, result.gpr(), op1GPR, op2GPR); 294 294 addBranch(m_jit.branchTest8(condition, result.gpr()), taken); 295 295 … … 570 570 ASSERT(node.adjustedRefCount() == 1); 571 571 572 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThan); 572 if (compareIsInteger(node.child1, node.child2)) 573 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThan); 574 else 575 compilePeepHoleCall(node, branchNodeIndex, operationCompareLess); 573 576 574 577 use(node.child1); … … 599 602 ASSERT(node.adjustedRefCount() == 1); 600 603 601 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThanOrEqual); 604 if (compareIsInteger(node.child1, node.child2)) 605 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThanOrEqual); 606 else 607 compilePeepHoleCall(node, branchNodeIndex, operationCompareLessEq); 602 608 603 609 use(node.child1); … … 628 634 ASSERT(node.adjustedRefCount() == 1); 629 635 630 if ( isInteger(node.child1) || isInteger(node.child2))636 if (compareIsInteger(node.child1, node.child2)) 631 637 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::Equal); 632 638 else 633 compilePeepHole Eq(node, branchNodeIndex);639 compilePeepHoleCall(node, branchNodeIndex, operationCompareEq); 634 640 635 641 use(node.child1); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r89956 r89957 170 170 } 171 171 172 bool isDataFormatDouble(NodeIndex nodeIndex) 173 { 174 Node& node = m_jit.graph()[nodeIndex]; 175 VirtualRegister virtualRegister = node.virtualRegister(); 176 GenerationInfo& info = m_generationInfo[virtualRegister]; 177 178 return (info.registerFormat() | DataFormatJS) == DataFormatJSDouble; 179 } 180 181 bool compareIsInteger(NodeIndex op1, NodeIndex op2) 182 { 183 return !(isDataFormatDouble(op1) || isDataFormatDouble(op2)) && (isInteger(op1) || isInteger(op2)); 184 } 185 172 186 void compilePeepHoleIntegerBranch(Node&, NodeIndex branchNodeIndex, JITCompiler::RelationalCondition); 173 void compilePeepHole Eq(Node&, NodeIndex branchNodeIndex);187 void compilePeepHoleCall(Node&, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ); 174 188 175 189 // Add a speculation check without additional recovery.
Note:
See TracChangeset
for help on using the changeset viewer.