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/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual ~RawMachineAssembler() {} | 50 virtual ~RawMachineAssembler() {} |
51 | 51 |
52 Isolate* isolate() const { return zone()->isolate(); } | 52 Isolate* isolate() const { return zone()->isolate(); } |
53 Zone* zone() const { return graph()->zone(); } | 53 Zone* zone() const { return graph()->zone(); } |
54 MachineOperatorBuilder* machine() { return &machine_; } | 54 MachineOperatorBuilder* machine() { return &machine_; } |
55 CommonOperatorBuilder* common() { return &common_; } | 55 CommonOperatorBuilder* common() { return &common_; } |
56 CallDescriptor* call_descriptor() const { return call_descriptor_; } | 56 CallDescriptor* call_descriptor() const { return call_descriptor_; } |
57 size_t parameter_count() const { return machine_sig_->parameter_count(); } | 57 size_t parameter_count() const { return machine_sig_->parameter_count(); } |
58 MachineSignature* machine_sig() const { return machine_sig_; } | 58 MachineSignature* machine_sig() const { return machine_sig_; } |
59 | 59 |
| 60 Node* UndefinedConstant() { |
| 61 PrintableUnique<Object> unique = PrintableUnique<Object>::CreateImmovable( |
| 62 zone(), isolate()->factory()->undefined_value()); |
| 63 return NewNode(common()->HeapConstant(unique)); |
| 64 } |
| 65 |
60 // Parameters. | 66 // Parameters. |
61 Node* Parameter(size_t index); | 67 Node* Parameter(size_t index); |
62 | 68 |
63 // Control flow. | 69 // Control flow. |
64 Label* Exit(); | 70 Label* Exit(); |
65 void Goto(Label* label); | 71 void Goto(Label* label); |
66 void Branch(Node* condition, Label* true_val, Label* false_val); | 72 void Branch(Node* condition, Label* true_val, Label* false_val); |
67 // Call through CallFunctionStub with lazy deopt and frame-state. | 73 // Call through CallFunctionStub with lazy deopt and frame-state. |
68 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context, | 74 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context, |
69 Node* frame_state, CallFunctionFlags flags); | 75 Node* frame_state, CallFunctionFlags flags); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 BasicBlock* current_block_; | 120 BasicBlock* current_block_; |
115 | 121 |
116 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 122 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
117 }; | 123 }; |
118 | 124 |
119 } // namespace compiler | 125 } // namespace compiler |
120 } // namespace internal | 126 } // namespace internal |
121 } // namespace v8 | 127 } // namespace v8 |
122 | 128 |
123 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 129 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
OLD | NEW |