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

Unified Diff: src/compiler/generic-node-inl.h

Issue 521643002: Fix Node::ReplaceUses to handle unused nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | test/cctest/compiler/test-node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/generic-node-inl.h
diff --git a/src/compiler/generic-node-inl.h b/src/compiler/generic-node-inl.h
index e7a8f90f61b0726036df1caddbc23492ff21e9b3..82fd907c16e18811c00b8bf2c2ab3e4d9a5b2903 100644
--- a/src/compiler/generic-node-inl.h
+++ b/src/compiler/generic-node-inl.h
@@ -64,12 +64,13 @@ void GenericNode<B, S>::ReplaceUses(GenericNode* replace_to) {
if (replace_to->last_use_ == NULL) {
DCHECK_EQ(NULL, replace_to->first_use_);
replace_to->first_use_ = first_use_;
- } else {
+ replace_to->last_use_ = last_use_;
+ } else if (first_use_ != NULL) {
DCHECK_NE(NULL, replace_to->first_use_);
replace_to->last_use_->next = first_use_;
first_use_->prev = replace_to->last_use_;
+ replace_to->last_use_ = last_use_;
}
- replace_to->last_use_ = last_use_;
replace_to->use_count_ += use_count_;
use_count_ = 0;
first_use_ = NULL;
« no previous file with comments | « no previous file | test/cctest/compiler/test-node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698