Changeset 128699 in webkit for trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
- Timestamp:
- Sep 15, 2012, 7:36:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
r128544 r128699 148 148 AbstractValue value; 149 149 value.setMostSpecific(graph.m_mustHandleValues[i]); 150 block->valuesAtHead.operand(graph.m_mustHandleValues.operandForIndex(i)).merge(value); 150 int operand = graph.m_mustHandleValues.operandForIndex(i); 151 block->valuesAtHead.operand(operand).merge(value); 152 #if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE) 153 dataLog(" Initializing Block #%u, operand r%d, to ", blockIndex, operand); 154 block->valuesAtHead.operand(operand).dump(WTF::dataFile()); 155 dataLog("\n"); 156 #endif 151 157 } 152 158 block->cfaShouldRevisit = true; … … 1294 1300 || !isCellSpeculation(value.m_type)); 1295 1301 value.filter(set); 1296 // This is likely to be unnecessary, but it's conservative, and that's a good thing.1297 // This is trying to avoid situations where the CFA proves that this structure check1298 // must fail due to a future structure proof. We have two options at that point. We1299 // can either compile all subsequent code as we would otherwise, or we can ensure1300 // that the subsequent code is never reachable. The former is correct because the1301 // Proof Is Infallible (TM) -- hence even if we don't force the subsequent code to1302 // be unreachable, it must be unreachable nonetheless. But imagine what would happen1303 // if the proof was borked. In the former case, we'd get really bizarre bugs where1304 // we assumed that the structure of this object was known even though it wasn't. In1305 // the latter case, we'd have a slight performance pathology because this would be1306 // turned into an OSR exit unnecessarily. Which would you rather have?1307 if (value.m_currentKnownStructure.isClear()1308 || value.m_futurePossibleStructure.isClear())1309 m_isValid = false;1310 1302 m_haveStructures = true; 1311 1303 break; … … 1326 1318 ASSERT(value.isClear() || isCellSpeculation(value.m_type)); // Value could be clear if we've proven must-exit due to a speculation statically known to be bad. 1327 1319 value.filter(node.structure()); 1328 // See comment in CheckStructure for why this is here.1329 if (value.m_currentKnownStructure.isClear()1330 || value.m_futurePossibleStructure.isClear())1331 m_isValid = false;1332 1320 m_haveStructures = true; 1333 1321 node.setCanExit(true); … … 1338 1326 case PhantomPutStructure: 1339 1327 node.setCanExit(false); 1340 clobberStructures(indexInBlock); 1341 forNode(node.child1()).set(node.structureTransitionData().newStructure); 1342 m_haveStructures = true; 1328 if (!forNode(node.child1()).m_currentKnownStructure.isClear()) { 1329 clobberStructures(indexInBlock); 1330 forNode(node.child1()).set(node.structureTransitionData().newStructure); 1331 m_haveStructures = true; 1332 } 1343 1333 break; 1344 1334 case GetButterfly:
Note:
See TracChangeset
for help on using the changeset viewer.