Reviewers: Kevin Millikin,
Message:
Tiny change. PTAQL.
Description:
Speedup HInstruction::Verify() for pathological cases
BUG=1767
TEST=mjsunit/numops-fuzz doesn't timeout in debug mode
Please review this at http://codereview.chromium.org/8302023/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen-instructions.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
bbb56ee5f558d7f020e3ca4f801d380ccca99f83..a90e95f7b847cf041ab278b9417c1ccab7d5a963
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -587,11 +587,10 @@ void HInstruction::Verify() {
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