Revision: 10816
Author: [email protected]
Date: Thu Feb 23 07:37:27 2012
Log: Fix bug in r10812.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9455016
http://code.google.com/p/v8/source/detail?r=10816
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Feb 23
05:59:35 2012
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Feb 23
07:37:27 2012
@@ -384,9 +384,18 @@
if (other != NULL) ReplaceAllUsesWith(other);
ASSERT(HasNoUses());
// Clearing the operands includes going through the use list of each
operand
- // to remove this HValue, which can be expensive. Instead, we simply
mark it
- // as dead and remove it lazily from the operands' use lists.
+ // to remove this HValue, which can be expensive. Instead, we mark this
as
+ // dead and only check the first item in the use list of each operand.
+ // For the following items in the use lists we rely on the tail() method
to
+ // skip dead dead items and remove them lazily.
SetFlag(kIsDead);
+ for (int i = 0; i < OperandCount(); ++i) {
+ HValue* operand = OperandAt(i);
+ HUseListNode* first = operand->use_list_;
+ if (first != NULL && first->index() == i && first->value() == this) {
+ operand->use_list_ = first->tail();
+ }
+ }
DeleteFromGraph();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev