Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: src/hydrogen-instructions.cc

Issue 8302023: Speedup HInstruction::Verify() for pathological cases (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698