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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 Node* Float32Constant(float value) { | 98 Node* Float32Constant(float value) { |
99 return NewNode(common()->Float32Constant(value)); | 99 return NewNode(common()->Float32Constant(value)); |
100 } | 100 } |
101 Node* Float64Constant(double value) { | 101 Node* Float64Constant(double value) { |
102 return NewNode(common()->Float64Constant(value)); | 102 return NewNode(common()->Float64Constant(value)); |
103 } | 103 } |
104 Node* HeapConstant(Handle<HeapObject> object) { | 104 Node* HeapConstant(Handle<HeapObject> object) { |
105 return NewNode(common()->HeapConstant(object)); | 105 return NewNode(common()->HeapConstant(object)); |
106 } | 106 } |
| 107 Node* BooleanConstant(bool value) { |
| 108 Handle<HeapObject> boolean_value = |
| 109 value ? isolate()->factory()->true_value() |
| 110 : isolate()->factory()->false_value(); |
| 111 return NewNode(common()->HeapConstant(boolean_value)); |
| 112 } |
107 Node* ExternalConstant(ExternalReference address) { | 113 Node* ExternalConstant(ExternalReference address) { |
108 return NewNode(common()->ExternalConstant(address)); | 114 return NewNode(common()->ExternalConstant(address)); |
109 } | 115 } |
110 | 116 |
111 Node* Projection(int index, Node* a) { | 117 Node* Projection(int index, Node* a) { |
112 return NewNode(common()->Projection(index), a); | 118 return NewNode(common()->Projection(index), a); |
113 } | 119 } |
114 | 120 |
115 // Memory Operations. | 121 // Memory Operations. |
116 Node* Load(MachineType rep, Node* base) { | 122 Node* Load(MachineType rep, Node* base) { |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 BasicBlock* current_block_; | 596 BasicBlock* current_block_; |
591 | 597 |
592 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 598 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
593 }; | 599 }; |
594 | 600 |
595 } // namespace compiler | 601 } // namespace compiler |
596 } // namespace internal | 602 } // namespace internal |
597 } // namespace v8 | 603 } // namespace v8 |
598 | 604 |
599 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 605 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
OLD | NEW |