Revision: 9642
Author:   [email protected]
Date:     Mon Oct 17 00:52:20 2011
Log:      Speedup HInstruction::Verify() for pathological cases

BUG=v8:1767
TEST=mjsunit/numops-fuzz doesn't timeout in debug mode

Review URL: http://codereview.chromium.org/8302023
http://code.google.com/p/v8/source/detail?r=9642

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Fri Oct 14 06:16:23 2011 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Oct 17 00:52:20 2011
@@ -587,11 +587,10 @@
     HBasicBlock* other_block = other_operand->block();
     if (cur_block == other_block) {
       if (!other_operand->IsPhi()) {
-        HInstruction* cur = cur_block->first();
+        HInstruction* cur = this->previous();
         while (cur != NULL) {
-          ASSERT(cur != this);  // We should reach other_operand before!
           if (cur == other_operand) break;
-          cur = cur->next();
+          cur = cur->previous();
         }
         // Must reach other operand in the same block!
         ASSERT(cur == other_operand);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to