Changeset 128699 in webkit for trunk/Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp
- Timestamp:
- Sep 15, 2012, 7:36:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp
r128400 r128699 68 68 continue; 69 69 switch (node.op()) { 70 case CheckStructure: { 70 case CheckStructure: 71 case StructureTransitionWatchpoint: { 71 72 Node& child = m_graph[node.child1()]; 72 73 if (child.op() != GetLocal) … … 92 93 case PutByOffset: 93 94 case PutStructure: 94 case StructureTransitionWatchpoint:95 95 case AllocatePropertyStorage: 96 96 case ReallocatePropertyStorage: … … 105 105 // Don't count these uses. 106 106 break; 107 108 case SetLocal: { 109 // Find all uses of the source of the SetLocal. If any of them are a 110 // kind of CheckStructure, then we should notice them to ensure that 111 // we're not hoisting a check that would contravene checks that are 112 // already being performed. 113 VariableAccessData* variable = node.variableAccessData(); 114 if (variable->isCaptured() || variable->structureCheckHoistingFailed()) 115 break; 116 if (!isCellSpeculation(variable->prediction())) 117 break; 118 NodeIndex source = node.child1().index(); 119 for (unsigned subIndexInBlock = 0; subIndexInBlock < block->size(); ++subIndexInBlock) { 120 NodeIndex subNodeIndex = block->at(subIndexInBlock); 121 Node& subNode = m_graph[subNodeIndex]; 122 if (!subNode.shouldGenerate()) 123 continue; 124 switch (subNode.op()) { 125 case CheckStructure: 126 case StructureTransitionWatchpoint: { 127 if (subNode.child1().index() != source) 128 break; 129 130 noticeStructureCheck(variable, subNode.structureSet()); 131 break; 132 } 133 default: 134 break; 135 } 136 } 137 138 m_graph.vote(node, VoteOther); 139 break; 140 } 107 141 108 142 default:
Note:
See TracChangeset
for help on using the changeset viewer.