Index: src/compiler/raw-machine-assembler.cc |
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc |
index 6e80bb0c83018ede4006a339c8b8f544dd392c06..fba6189888137096fe4f83156d0bb824e897e6f3 100644 |
--- a/src/compiler/raw-machine-assembler.cc |
+++ b/src/compiler/raw-machine-assembler.cc |
@@ -21,7 +21,7 @@ RawMachineAssembler::RawMachineAssembler(Isolate* isolate, Graph* graph, |
machine_(zone(), word, flags), |
common_(zone()), |
call_descriptor_(call_descriptor), |
- parameters_(NULL), |
+ parameters_(nullptr), |
current_block_(schedule()->start()) { |
int param_count = static_cast<int>(parameter_count()); |
Node* s = graph->NewNode(common_.Start(param_count)); |
@@ -41,7 +41,7 @@ Schedule* RawMachineAssembler::Export() { |
Scheduler::ComputeSpecialRPO(zone(), schedule_); |
// Invalidate RawMachineAssembler. |
Schedule* schedule = schedule_; |
- schedule_ = NULL; |
+ schedule_ = nullptr; |
return schedule; |
} |
@@ -55,7 +55,7 @@ Node* RawMachineAssembler::Parameter(size_t index) { |
void RawMachineAssembler::Goto(Label* label) { |
DCHECK(current_block_ != schedule()->end()); |
schedule()->AddGoto(CurrentBlock(), Use(label)); |
- current_block_ = NULL; |
+ current_block_ = nullptr; |
} |
@@ -64,7 +64,7 @@ void RawMachineAssembler::Branch(Node* condition, Label* true_val, |
DCHECK(current_block_ != schedule()->end()); |
Node* branch = NewNode(common()->Branch(), condition); |
schedule()->AddBranch(CurrentBlock(), branch, Use(true_val), Use(false_val)); |
- current_block_ = NULL; |
+ current_block_ = nullptr; |
} |
@@ -93,9 +93,9 @@ void RawMachineAssembler::Switch(Node* index, Label* default_label, |
void RawMachineAssembler::Return(Node* value) { |
- Node* ret = NewNode(common()->Return(), value); |
+ Node* ret = graph()->NewNode(common()->Return(), value); |
schedule()->AddReturn(CurrentBlock(), ret); |
- current_block_ = NULL; |
+ current_block_ = nullptr; |
} |
@@ -216,7 +216,7 @@ Node* RawMachineAssembler::CallCFunction8( |
void RawMachineAssembler::Bind(Label* label) { |
- DCHECK(current_block_ == NULL); |
+ DCHECK(current_block_ == nullptr); |
DCHECK(!label->bound_); |
label->bound_ = true; |
current_block_ = EnsureBlock(label); |
@@ -230,7 +230,7 @@ BasicBlock* RawMachineAssembler::Use(Label* label) { |
BasicBlock* RawMachineAssembler::EnsureBlock(Label* label) { |
- if (label->block_ == NULL) label->block_ = schedule()->NewBasicBlock(); |
+ if (label->block_ == nullptr) label->block_ = schedule()->NewBasicBlock(); |
return label->block_; |
} |
@@ -244,13 +244,9 @@ BasicBlock* RawMachineAssembler::CurrentBlock() { |
Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, |
Node** inputs) { |
DCHECK_NOT_NULL(schedule_); |
- DCHECK(current_block_ != NULL); |
+ DCHECK(current_block_ != nullptr); |
Node* node = graph()->NewNode(op, input_count, inputs); |
- BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() |
- : CurrentBlock(); |
- if (op->opcode() != IrOpcode::kReturn) { |
- schedule()->AddNode(block, node); |
- } |
+ schedule()->AddNode(CurrentBlock(), node); |
return node; |
} |