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

Unified Diff: src/hydrogen-load-elimination.cc

Issue 336483002: remove this == null (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/heap.cc ('k') | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-load-elimination.cc
diff --git a/src/hydrogen-load-elimination.cc b/src/hydrogen-load-elimination.cc
index bc6707828cae8f3ff4ebfe02560edbf25211d5c5..5cefcf75258ae4128111d9ad7ef1cb01c772e8f6 100644
--- a/src/hydrogen-load-elimination.cc
+++ b/src/hydrogen-load-elimination.cc
@@ -25,11 +25,10 @@ class HFieldApproximation : public ZoneObject {
// Recursively copy the entire linked list of field approximations.
HFieldApproximation* Copy(Zone* zone) {
- if (this == NULL) return NULL;
HFieldApproximation* copy = new(zone) HFieldApproximation();
copy->object_ = this->object_;
copy->last_value_ = this->last_value_;
- copy->next_ = this->next_->Copy(zone);
+ copy->next_ = this->next_ == NULL ? NULL : this->next_->Copy(zone);
return copy;
}
};
@@ -148,7 +147,7 @@ class HLoadEliminationTable : public ZoneObject {
new(zone) HLoadEliminationTable(zone, aliasing_);
copy->EnsureFields(fields_.length());
for (int i = 0; i < fields_.length(); i++) {
- copy->fields_[i] = fields_[i]->Copy(zone);
+ copy->fields_[i] = fields_[i] == NULL ? NULL : fields_[i]->Copy(zone);
}
if (FLAG_trace_load_elimination) {
TRACE((" copy-to B%d\n", succ->block_id()));
« no previous file with comments | « src/heap.cc ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698