Changeset 248798 in webkit for trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
- Timestamp:
- Aug 16, 2019, 2:33:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
r247724 r248798 275 275 RELEASE_ASSERT(left != m_right); 276 276 m_left = left; 277 } 278 void setRight(NodeFlowProjection right) 279 { 280 RELEASE_ASSERT(right != m_left); 281 m_right = right; 277 282 } 278 283 bool addToOffset(int offset) … … 1327 1332 } 1328 1333 } 1334 1335 if (DFGIntegerRangeOptimizationPhaseInternal::verbose) 1336 dataLogLn("CheckInBounds ", node, " has: ", nonNegative, " ", lessThanLength); 1329 1337 1330 1338 if (nonNegative && lessThanLength) { … … 1644 1652 if (timeToLive && otherRelationship.kind() == Relationship::Equal) { 1645 1653 if (DFGIntegerRangeOptimizationPhaseInternal::verbose) 1646 dataLog(" Considering : ", otherRelationship, "\n");1654 dataLog(" Considering (lhs): ", otherRelationship, "\n"); 1647 1655 1648 1656 // We have: … … 1665 1673 } 1666 1674 } 1675 } 1676 } 1677 1678 if (timeToLive && relationship.kind() != Relationship::Equal) { 1679 for (Relationship& possibleEquality : relationshipMap.get(relationship.right())) { 1680 if (possibleEquality.kind() != Relationship::Equal 1681 || possibleEquality.offset() == std::numeric_limits<int>::min() 1682 || possibleEquality.right() == relationship.left()) 1683 continue; 1684 if (DFGIntegerRangeOptimizationPhaseInternal::verbose) 1685 dataLog(" Considering (rhs): ", possibleEquality, "\n"); 1686 1687 // We have: 1688 // @a op @b + C 1689 // @b == @c + D 1690 // 1691 // This implies: 1692 // @a op @c + (C + D) 1693 // 1694 // Where: @a == relationship.left(), @b == relationship.right() 1695 1696 Relationship newRelationship = relationship; 1697 newRelationship.setRight(possibleEquality.right()); 1698 if (newRelationship.addToOffset(possibleEquality.offset())) 1699 toAdd.append(newRelationship); 1667 1700 } 1668 1701 }
Note:
See TracChangeset
for help on using the changeset viewer.