Changeset 164651 in webkit for trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
- Timestamp:
- Feb 25, 2014, 9:47:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r164620 r164651 1063 1063 // https://bugs.webkit.org/show_bug.cgi?id=126778 1064 1064 m_requiredPhantoms.resize(0); 1065 // Since StoreBarriers are recursively fixed up so that their children look 1066 // identical to that of the node they're barrier-ing, we need to avoid adding 1067 // any Phantoms when processing them because this would invalidate the 1068 // InsertionSet's invariant of inserting things in a monotonically increasing 1069 // order. This should be okay anyways because StoreBarriers can't exit. 1065 1070 } else 1066 1071 addPhantomsIfNecessary(); … … 1611 1616 void insertStoreBarrier(unsigned indexInBlock, Edge child1, Edge child2 = Edge()) 1612 1617 { 1613 if (!child2) { 1614 m_insertionSet.insertNode( 1615 indexInBlock, SpecNone, StoreBarrier, m_currentNode->origin, child1); 1616 return; 1617 } 1618 1619 // Figure out some cheap way of avoiding the barrier entirely. In addition to being 1620 // cheap, we try to make these checks strong: we want to prove as much as possible for 1621 // the code that follows. 1622 if (child2->shouldSpeculateInt32()) { 1623 insertPhantomCheck(indexInBlock, child2.node(), Int32Use); 1624 return; 1625 } 1626 if (child2->shouldSpeculateMachineInt()) { 1627 insertPhantomCheck(indexInBlock, child2.node(), MachineIntUse); 1628 return; 1629 } 1630 if (child2->shouldSpeculateBoolean()) { 1631 insertPhantomCheck(indexInBlock, child2.node(), BooleanUse); 1632 return; 1633 } 1634 if (child2->shouldSpeculateOther()) { 1635 insertPhantomCheck(indexInBlock, child2.node(), OtherUse); 1636 return; 1637 } 1638 if (child2->shouldSpeculateNotCell()) { 1639 insertPhantomCheck(indexInBlock, child2.node(), NotCellUse); 1640 return; 1641 } 1642 1643 m_insertionSet.insertNode( 1644 indexInBlock, SpecNone, ConditionalStoreBarrier, m_currentNode->origin, 1645 child1, Edge(child2.node(), UntypedUse)); 1646 } 1647 1648 void insertPhantomCheck(unsigned indexInBlock, Node* node, UseKind useKind) 1649 { 1650 m_insertionSet.insertNode( 1651 indexInBlock, SpecNone, Phantom, m_currentNode->origin, Edge(node, useKind)); 1652 observeUseKindOnNode(node, useKind); 1618 Node* barrierNode; 1619 if (!child2) 1620 barrierNode = m_graph.addNode(SpecNone, StoreBarrier, m_currentNode->origin, Edge(child1.node(), child1.useKind())); 1621 else { 1622 barrierNode = m_graph.addNode(SpecNone, ConditionalStoreBarrier, m_currentNode->origin, 1623 Edge(child1.node(), child1.useKind()), Edge(child2.node(), child2.useKind())); 1624 } 1625 m_insertionSet.insert(indexInBlock, barrierNode); 1653 1626 } 1654 1627
Note:
See TracChangeset
for help on using the changeset viewer.