Changeset 253991 in webkit for trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
- Timestamp:
- Jan 3, 2020, 1:20:48 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r253896 r253991 607 607 AbstractValue valueValue = m_state.forNode(node->child2()); 608 608 609 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before.610 alreadyHandled = true; // Don't allow the default constant folder to do things to this.611 612 609 if (!baseValue.m_structure.isFinite()) 613 610 break; 614 611 615 612 PutByIdStatus status = PutByIdStatus::computeFor( 616 613 m_graph.globalObjectFor(origin.semantic), … … 618 615 m_graph.identifiers()[identifierNumber], 619 616 node->op() == PutByIdDirect); 620 617 621 618 if (!status.isSimple()) 622 619 break; … … 630 627 631 628 bool allGood = true; 629 RegisteredStructureSet newSet; 630 TransitionVector transitions; 632 631 for (const PutByIdVariant& variant : status.variants()) { 633 if (!allGood)634 break;635 632 for (const ObjectPropertyCondition& condition : variant.conditionSet()) { 636 633 if (m_graph.watchCondition(condition)) … … 649 646 indexInBlock, node->origin, condition.object(), KnownCellUse)); 650 647 } 648 649 if (!allGood) 650 break; 651 652 if (variant.kind() == PutByIdVariant::Transition) { 653 RegisteredStructure newStructure = m_graph.registerStructure(variant.newStructure()); 654 transitions.append( 655 Transition( 656 m_graph.registerStructure(variant.oldStructureForTransition()), newStructure)); 657 newSet.add(newStructure); 658 } else { 659 ASSERT(variant.kind() == PutByIdVariant::Replace); 660 newSet.merge(*m_graph.addStructureSet(variant.oldStructure())); 661 } 651 662 } 652 663 653 664 if (!allGood) 654 665 break; 666 667 // Push CFA over this node after we get the state before. 668 m_interpreter.didFoldClobberWorld(); 669 m_interpreter.observeTransitions(indexInBlock, transitions); 670 if (m_state.forNode(node->child1()).changeStructure(m_graph, newSet) == Contradiction) 671 m_state.setIsValid(false); 672 673 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 655 674 656 675 m_insertionSet.insertNode(
Note:
See TracChangeset
for help on using the changeset viewer.