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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 CallDescriptor* call_descriptor_; | 693 CallDescriptor* call_descriptor_; |
694 NodeVector parameters_; | 694 NodeVector parameters_; |
695 BasicBlock* current_block_; | 695 BasicBlock* current_block_; |
696 | 696 |
697 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 697 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
698 }; | 698 }; |
699 | 699 |
700 | 700 |
701 class RawMachineLabel final { | 701 class RawMachineLabel final { |
702 public: | 702 public: |
703 RawMachineLabel(); | 703 enum Type { kDeferred, kNonDeferred }; |
| 704 |
| 705 explicit RawMachineLabel(Type type = kNonDeferred) |
| 706 : deferred_(type == kDeferred) {} |
704 ~RawMachineLabel(); | 707 ~RawMachineLabel(); |
705 | 708 |
706 private: | 709 private: |
707 BasicBlock* block_; | 710 BasicBlock* block_ = nullptr; |
708 bool used_; | 711 bool used_ = false; |
709 bool bound_; | 712 bool bound_ = false; |
| 713 bool deferred_; |
710 friend class RawMachineAssembler; | 714 friend class RawMachineAssembler; |
711 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); | 715 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); |
712 }; | 716 }; |
713 | 717 |
714 } // namespace compiler | 718 } // namespace compiler |
715 } // namespace internal | 719 } // namespace internal |
716 } // namespace v8 | 720 } // namespace v8 |
717 | 721 |
718 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 722 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
OLD | NEW |