Changeset 247183 in webkit
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r247173 r247183 1 2019-07-05 Mark Lam <mark.lam@apple.com> 2 3 ArgumentsEliminationPhase::eliminateCandidatesThatInterfere() should not decrement nodeIndex pass zero. 4 https://bugs.webkit.org/show_bug.cgi?id=199533 5 <rdar://problem/52669111> 6 7 Reviewed by Filip Pizlo. 8 9 * stress/ArgumentsEliminationPhase-eliminateCandidatesThatEscape-should-not-decrement-nodeIndex-pass-zero.js: Added. 10 1 11 2019-07-05 Alexey Shvayka <shvaikalesh@gmail.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r247175 r247183 1 2019-07-05 Mark Lam <mark.lam@apple.com> 2 3 ArgumentsEliminationPhase::eliminateCandidatesThatInterfere() should not decrement nodeIndex pass zero. 4 https://bugs.webkit.org/show_bug.cgi?id=199533 5 <rdar://problem/52669111> 6 7 Reviewed by Filip Pizlo. 8 9 * dfg/DFGArgumentsEliminationPhase.cpp: 10 1 11 2019-07-05 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp
r246075 r247183 605 605 606 606 // This loop considers all nodes up to the nodeIndex, excluding the nodeIndex. 607 while (nodeIndex--) { 607 // 608 // Note: nodeIndex here has a double meaning. Before entering this 609 // while loop, it refers to the remaining number of nodes that have 610 // yet to be processed. Inside the look, it refers to the index 611 // of the current node to process (after we decrement it). 612 // 613 // If the remaining number of nodes is 0, we should not decrement nodeIndex. 614 // Hence, we must only decrement nodeIndex inside the while loop instead of 615 // in its condition statement. Note that this while loop is embedded in an 616 // outer for loop. If we decrement nodeIndex in the condition statement, a 617 // nodeIndex of 0 will become UINT_MAX, and the outer loop will wrongly 618 // treat this as there being UINT_MAX remaining nodes to process. 619 while (nodeIndex) { 620 --nodeIndex; 608 621 Node* node = block->at(nodeIndex); 609 622 if (node == candidate)
Note: See TracChangeset
for help on using the changeset viewer.