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

Unified Diff: src/compiler/node.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow dchecks. Created 5 years, 11 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
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index a4680e4636f1630219fcfc4041e3aef1f260edbf..de4aafcda82e453758490b7063a997158e106ddb 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -39,15 +39,15 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
void Node::Kill() {
- DCHECK_NOT_NULL(op());
+ DCHECK(op());
RemoveAllInputs();
DCHECK(uses().empty());
}
void Node::AppendInput(Zone* zone, Node* new_to) {
- DCHECK_NOT_NULL(zone);
- DCHECK_NOT_NULL(new_to);
+ DCHECK(zone);
+ DCHECK(new_to);
Use* new_use = new (zone) Use;
Input new_input;
new_input.to = new_to;
@@ -68,7 +68,7 @@ void Node::AppendInput(Zone* zone, Node* new_to) {
void Node::InsertInput(Zone* zone, int index, Node* new_to) {
- DCHECK_NOT_NULL(zone);
+ DCHECK(zone);
DCHECK_LE(0, index);
DCHECK_LT(index, InputCount());
AppendInput(zone, InputAt(InputCount() - 1));
@@ -134,11 +134,11 @@ void Node::ReplaceUses(Node* replace_to) {
use->from->GetInputRecordPtr(use->input_index)->to = replace_to;
}
if (!replace_to->last_use_) {
- DCHECK_EQ(nullptr, replace_to->first_use_);
+ DCHECK(!replace_to->first_use_);
replace_to->first_use_ = first_use_;
replace_to->last_use_ = last_use_;
} else if (first_use_) {
- DCHECK_NOT_NULL(replace_to->first_use_);
+ DCHECK(replace_to->first_use_);
replace_to->last_use_->next = first_use_;
first_use_->prev = replace_to->last_use_;
replace_to->last_use_ = last_use_;

Powered by Google App Engine
This is Rietveld 408576698