Changeset 223523 in webkit for trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
- Timestamp:
- Oct 17, 2017, 5:02:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r223318 r223523 1601 1601 fixEdge<Int32Use>(node->child1()); 1602 1602 fixEdge<Int32Use>(node->child2()); 1603 break; 1604 } 1605 1606 case GetPrototypeOf: { 1607 fixupGetPrototypeOf(node); 1603 1608 break; 1604 1609 } … … 2303 2308 } 2304 2309 2310 void fixupGetPrototypeOf(Node* node) 2311 { 2312 // Reflect.getPrototypeOf only accepts Objects. For Reflect.getPrototypeOf, ByteCodeParser attaches ObjectUse edge filter before fixup phase. 2313 if (node->child1().useKind() != ObjectUse) { 2314 if (node->child1()->shouldSpeculateString()) { 2315 insertCheck<StringUse>(node->child1().node()); 2316 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->stringPrototype())); 2317 return; 2318 } 2319 if (node->child1()->shouldSpeculateInt32()) { 2320 insertCheck<Int32Use>(node->child1().node()); 2321 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->numberPrototype())); 2322 return; 2323 } 2324 if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) { 2325 insertCheck<Int52RepUse>(node->child1().node()); 2326 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->numberPrototype())); 2327 return; 2328 } 2329 if (node->child1()->shouldSpeculateNumber()) { 2330 insertCheck<NumberUse>(node->child1().node()); 2331 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->numberPrototype())); 2332 return; 2333 } 2334 if (node->child1()->shouldSpeculateSymbol()) { 2335 insertCheck<SymbolUse>(node->child1().node()); 2336 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->symbolPrototype())); 2337 return; 2338 } 2339 if (node->child1()->shouldSpeculateBoolean()) { 2340 insertCheck<BooleanUse>(node->child1().node()); 2341 m_graph.convertToConstant(node, m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic)->booleanPrototype())); 2342 return; 2343 } 2344 } 2345 2346 if (node->child1()->shouldSpeculateFinalObject()) { 2347 fixEdge<FinalObjectUse>(node->child1()); 2348 node->clearFlags(NodeMustGenerate); 2349 return; 2350 } 2351 if (node->child1()->shouldSpeculateArray()) { 2352 fixEdge<ArrayUse>(node->child1()); 2353 node->clearFlags(NodeMustGenerate); 2354 return; 2355 } 2356 if (node->child1()->shouldSpeculateFunction()) { 2357 fixEdge<FunctionUse>(node->child1()); 2358 node->clearFlags(NodeMustGenerate); 2359 return; 2360 } 2361 } 2362 2305 2363 void fixupToThis(Node* node) 2306 2364 {
Note:
See TracChangeset
for help on using the changeset viewer.