Changeset 90533 in webkit
- Timestamp:
- Jul 6, 2011 9:04:29 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r90529 r90533 1 2011-07-06 Filip Pizlo <fpizlo@apple.com> 2 3 DFG JIT implementation of op_call results in regressions on sunspider 4 controlflow-recursive. 5 https://bugs.webkit.org/show_bug.cgi?id=64039 6 7 Reviewed by Gavin Barraclough. 8 9 * dfg/DFGByteCodeParser.cpp: 10 (JSC::DFG::ByteCodeParser::isSmallInt32Constant): 11 (JSC::DFG::ByteCodeParser::parseBlock): 12 * dfg/DFGSpeculativeJIT.h: 13 (JSC::DFG::SpeculativeJIT::isInteger): 14 1 15 2011-07-06 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r90529 r90533 254 254 { 255 255 return isJSConstant(nodeIndex) && valueOfJSConstant(nodeIndex).isInt32(); 256 } 257 bool isSmallInt32Constant(NodeIndex nodeIndex) 258 { 259 if (!isJSConstant(nodeIndex)) 260 return false; 261 JSValue value = valueOfJSConstant(nodeIndex); 262 if (!value.isInt32()) 263 return false; 264 int32_t intValue = value.asInt32(); 265 return intValue >= -5 && intValue <= 5; 256 266 } 257 267 bool isDoubleConstant(NodeIndex nodeIndex) … … 676 686 // If both operands can statically be determined to the numbers, then this is an arithmetic add. 677 687 // Otherwise, we must assume this may be performing a concatenation to a string. 678 if (m_graph[op1].hasNumericResult() && m_graph[op2].hasNumericResult()) 688 if (m_graph[op1].hasNumericResult() && m_graph[op2].hasNumericResult()) { 689 if (isSmallInt32Constant(op1) || isSmallInt32Constant(op2)) { 690 predictInt32(op1); 691 predictInt32(op2); 692 } 679 693 set(currentInstruction[1].u.operand, addToGraph(ArithAdd, toNumber(op1), toNumber(op2))); 680 else694 } else 681 695 set(currentInstruction[1].u.operand, addToGraph(ValueAdd, op1, op2)); 682 696 NEXT_OPCODE(op_add); … … 687 701 NodeIndex op1 = getToNumber(currentInstruction[2].u.operand); 688 702 NodeIndex op2 = getToNumber(currentInstruction[3].u.operand); 703 if (isSmallInt32Constant(op1) || isSmallInt32Constant(op2)) { 704 predictInt32(op1); 705 predictInt32(op2); 706 } 689 707 set(currentInstruction[1].u.operand, addToGraph(ArithSub, op1, op2)); 690 708 NEXT_OPCODE(op_sub); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r90423 r90533 167 167 VirtualRegister virtualRegister = node.virtualRegister(); 168 168 GenerationInfo& info = m_generationInfo[virtualRegister]; 169 170 return (info.registerFormat() | DataFormatJS) == DataFormatJSInteger; 169 170 return (info.registerFormat() | DataFormatJS) == DataFormatJSInteger 171 || (info.spillFormat() | DataFormatJS) == DataFormatJSInteger; 171 172 } 172 173
Note: See TracChangeset
for help on using the changeset viewer.