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

Side by Side Diff: src/compiler/node.cc

Issue 893533003: Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | src/compiler/osr.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/node.h" 5 #include "src/compiler/node.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 return use->from; 128 return use->from;
129 } 129 }
130 130
131 131
132 void Node::ReplaceUses(Node* replace_to) { 132 void Node::ReplaceUses(Node* replace_to) {
133 for (Use* use = first_use_; use; use = use->next) { 133 for (Use* use = first_use_; use; use = use->next) {
134 use->from->GetInputRecordPtr(use->input_index)->to = replace_to; 134 use->from->GetInputRecordPtr(use->input_index)->to = replace_to;
135 } 135 }
136 if (!replace_to->last_use_) { 136 if (!replace_to->last_use_) {
137 DCHECK(!replace_to->first_use_); 137 DCHECK_EQ(nullptr, replace_to->first_use_);
138 replace_to->first_use_ = first_use_; 138 replace_to->first_use_ = first_use_;
139 replace_to->last_use_ = last_use_; 139 replace_to->last_use_ = last_use_;
140 } else if (first_use_) { 140 } else if (first_use_) {
141 DCHECK_NOT_NULL(replace_to->first_use_); 141 DCHECK_NOT_NULL(replace_to->first_use_);
142 replace_to->last_use_->next = first_use_; 142 replace_to->last_use_->next = first_use_;
143 first_use_->prev = replace_to->last_use_; 143 first_use_->prev = replace_to->last_use_;
144 replace_to->last_use_ = last_use_; 144 replace_to->last_use_ = last_use_;
145 } 145 }
146 first_use_ = nullptr; 146 first_use_ = nullptr;
147 last_use_ = nullptr; 147 last_use_ = nullptr;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 ++(*this); 267 ++(*this);
268 return result; 268 return result;
269 } 269 }
270 270
271 271
272 bool Node::Uses::empty() const { return begin() == end(); } 272 bool Node::Uses::empty() const { return begin() == end(); }
273 273
274 } // namespace compiler 274 } // namespace compiler
275 } // namespace internal 275 } // namespace internal
276 } // namespace v8 276 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698