Changeset 155567 in webkit for trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreter.h
- Timestamp:
- Sep 11, 2013, 2:49:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreter.h
r154290 r155567 160 160 BooleanResult booleanResult(Node*, AbstractValue&); 161 161 162 bool trySetConstant(Node* node, JSValue value)162 void setConstant(Node* node, JSValue value) 163 163 { 164 // Make sure we don't constant fold something that will produce values that contravene165 // predictions. If that happens then we know that the code will OSR exit, forcing166 // recompilation. But if we tried to constant fold then we'll have a very degenerate167 // IR: namely we'll have a JSConstant that contravenes its own prediction. There's a168 // lot of subtle code that assumes that169 // speculationFromValue(jsConstant) == jsConstant.prediction(). "Hardening" that code170 // is probably less sane than just pulling back on constant folding.171 SpeculatedType oldType = node->prediction();172 if (mergeSpeculations(speculationFromValue(value), oldType) != oldType)173 return false;174 175 164 forNode(node).set(m_graph, value); 176 return true;165 m_state.setFoundConstants(true); 177 166 } 178 167
Note:
See TracChangeset
for help on using the changeset viewer.