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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); | 421 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
422 return AddNode(common()->Call(descriptor), arraysize(args), args); | 422 return AddNode(common()->Call(descriptor), arraysize(args), args); |
423 } | 423 } |
424 | 424 |
425 | 425 |
426 void RawMachineAssembler::Bind(RawMachineLabel* label) { | 426 void RawMachineAssembler::Bind(RawMachineLabel* label) { |
427 DCHECK(current_block_ == nullptr); | 427 DCHECK(current_block_ == nullptr); |
428 DCHECK(!label->bound_); | 428 DCHECK(!label->bound_); |
429 label->bound_ = true; | 429 label->bound_ = true; |
430 current_block_ = EnsureBlock(label); | 430 current_block_ = EnsureBlock(label); |
| 431 current_block_->set_deferred(label->deferred_); |
431 } | 432 } |
432 | 433 |
433 | 434 |
434 BasicBlock* RawMachineAssembler::Use(RawMachineLabel* label) { | 435 BasicBlock* RawMachineAssembler::Use(RawMachineLabel* label) { |
435 label->used_ = true; | 436 label->used_ = true; |
436 return EnsureBlock(label); | 437 return EnsureBlock(label); |
437 } | 438 } |
438 | 439 |
439 | 440 |
440 BasicBlock* RawMachineAssembler::EnsureBlock(RawMachineLabel* label) { | 441 BasicBlock* RawMachineAssembler::EnsureBlock(RawMachineLabel* label) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 return node; | 474 return node; |
474 } | 475 } |
475 | 476 |
476 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, | 477 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, |
477 Node* const* inputs) { | 478 Node* const* inputs) { |
478 // The raw machine assembler nodes do not have effect and control inputs, | 479 // The raw machine assembler nodes do not have effect and control inputs, |
479 // so we disable checking input counts here. | 480 // so we disable checking input counts here. |
480 return graph()->NewNodeUnchecked(op, input_count, inputs); | 481 return graph()->NewNodeUnchecked(op, input_count, inputs); |
481 } | 482 } |
482 | 483 |
483 | |
484 RawMachineLabel::RawMachineLabel() | |
485 : block_(nullptr), used_(false), bound_(false) {} | |
486 | |
487 | |
488 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 484 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
489 | 485 |
490 } // namespace compiler | 486 } // namespace compiler |
491 } // namespace internal | 487 } // namespace internal |
492 } // namespace v8 | 488 } // namespace v8 |
OLD | NEW |