Changeset 121391 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Jun 27, 2012, 5:49:55 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r121382 r121391 1 2012-06-27 Filip Pizlo <[email protected]> 2 3 Javascript SHA-512 gives wrong hash on second and subsequent runs unless Web Inspector Javascript Debugging is on 4 https://bugs.webkit.org/show_bug.cgi?id=90053 5 <rdar://problem/11764613> 6 7 Reviewed by Mark Hahnenberg. 8 9 The problem is that the code was assuming that the recovery should be Undefined if the source of 10 the SetLocal was !shouldGenerate(). But that's wrong, since the DFG optimizer may skip around a 11 UInt32ToNumber node (hence making it !shouldGenerate()) and keep the source of that node alive. 12 In that case we should base the recovery on the source of the UInt32ToNumber. The logic for this 13 was already in place but the fast check for !shouldGenerate() broke it. 14 15 * dfg/DFGSpeculativeJIT.cpp: 16 (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): 17 1 18 2012-06-27 Filip Pizlo <[email protected]> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r121307 r121391 1398 1398 return ValueRecovery::constant(valueOfJSConstant(valueSource.nodeIndex())); 1399 1399 1400 if (!nodePtr->shouldGenerate()) { 1401 // It's legitimately dead. As in, nobody will ever use this node, or operand, 1402 // ever. Set it to Undefined to make the GC happy after the OSR. 1403 return ValueRecovery::constant(jsUndefined()); 1404 } 1405 1406 GenerationInfo* infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1407 if (!infoPtr->alive() || infoPtr->nodeIndex() != valueSource.nodeIndex()) { 1400 GenerationInfo* infoPtr; 1401 if (nodePtr->shouldGenerate()) 1402 infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1403 else 1404 infoPtr = 0; 1405 if (!infoPtr || !infoPtr->alive() || infoPtr->nodeIndex() != valueSource.nodeIndex()) { 1408 1406 // Try to see if there is an alternate node that would contain the value we want. 1409 1407 // There are four possibilities: … … 1432 1430 NodeIndex nodeIndex = nodePtr->child1().index(); 1433 1431 nodePtr = &at(nodeIndex); 1434 infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1435 if (infoPtr->alive() && infoPtr->nodeIndex() == nodeIndex) 1436 found = true; 1432 if (nodePtr->shouldGenerate()) { 1433 infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1434 if (infoPtr->alive() && infoPtr->nodeIndex() == nodeIndex) 1435 found = true; 1436 } 1437 1437 } 1438 1438 … … 1483 1483 if (nodeIndexToUse != NoNode) { 1484 1484 nodePtr = &at(nodeIndexToUse); 1485 infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1486 ASSERT(infoPtr->alive() && infoPtr->nodeIndex() == nodeIndexToUse); 1487 found = true; 1485 if (nodePtr->shouldGenerate()) { 1486 infoPtr = &m_generationInfo[nodePtr->virtualRegister()]; 1487 ASSERT(infoPtr->alive() && infoPtr->nodeIndex() == nodeIndexToUse); 1488 found = true; 1489 } 1488 1490 } 1489 1491 }
Note:
See TracChangeset
for help on using the changeset viewer.