OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/raw-machine-assembler.h" | 5 #include "src/compiler/raw-machine-assembler.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/compiler/scheduler.h" | 10 #include "src/compiler/scheduler.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 BasicBlock* RawMachineAssembler::CurrentBlock() { | 352 BasicBlock* RawMachineAssembler::CurrentBlock() { |
353 DCHECK(current_block_); | 353 DCHECK(current_block_); |
354 return current_block_; | 354 return current_block_; |
355 } | 355 } |
356 | 356 |
357 | 357 |
358 Node* RawMachineAssembler::AddNode(const Operator* op, int input_count, | 358 Node* RawMachineAssembler::AddNode(const Operator* op, int input_count, |
359 Node** inputs) { | 359 Node** inputs) { |
360 DCHECK_NOT_NULL(schedule_); | 360 DCHECK_NOT_NULL(schedule_); |
361 DCHECK(current_block_ != nullptr); | 361 DCHECK_NOT_NULL(current_block_); |
362 Node* node = MakeNode(op, input_count, inputs); | 362 Node* node = MakeNode(op, input_count, inputs); |
363 schedule()->AddNode(CurrentBlock(), node); | 363 schedule()->AddNode(CurrentBlock(), node); |
364 return node; | 364 return node; |
365 } | 365 } |
366 | 366 |
367 | 367 |
368 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, | 368 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, |
369 Node** inputs) { | 369 Node** inputs) { |
370 // The raw machine assembler nodes do not have effect and control inputs, | 370 // The raw machine assembler nodes do not have effect and control inputs, |
371 // so we disable checking input counts here. | 371 // so we disable checking input counts here. |
372 return graph()->NewNodeUnchecked(op, input_count, inputs); | 372 return graph()->NewNodeUnchecked(op, input_count, inputs); |
373 } | 373 } |
374 | 374 |
375 | 375 |
376 RawMachineLabel::RawMachineLabel() | 376 RawMachineLabel::RawMachineLabel() |
377 : block_(NULL), used_(false), bound_(false) {} | 377 : block_(nullptr), used_(false), bound_(false) {} |
378 | 378 |
379 | 379 |
380 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 380 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
381 | 381 |
382 } // namespace compiler | 382 } // namespace compiler |
383 } // namespace internal | 383 } // namespace internal |
384 } // namespace v8 | 384 } // namespace v8 |
OLD | NEW |