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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return IntPtrConstant(reinterpret_cast<intptr_t>(value)); | 72 return IntPtrConstant(reinterpret_cast<intptr_t>(value)); |
73 } | 73 } |
74 Node* IntPtrConstant(intptr_t value) { | 74 Node* IntPtrConstant(intptr_t value) { |
75 // TODO(dcarney): mark generated code as unserializable if value != 0. | 75 // TODO(dcarney): mark generated code as unserializable if value != 0. |
76 return kPointerSize == 8 ? Int64Constant(value) | 76 return kPointerSize == 8 ? Int64Constant(value) |
77 : Int32Constant(static_cast<int>(value)); | 77 : Int32Constant(static_cast<int>(value)); |
78 } | 78 } |
79 Node* Int32Constant(int32_t value) { | 79 Node* Int32Constant(int32_t value) { |
80 return AddNode(common()->Int32Constant(value)); | 80 return AddNode(common()->Int32Constant(value)); |
81 } | 81 } |
82 Node* StackSlot(MachineRepresentation rep) { | |
83 return AddNode(machine()->StackSlot(rep)); | |
84 } | |
85 Node* Int64Constant(int64_t value) { | 82 Node* Int64Constant(int64_t value) { |
86 return AddNode(common()->Int64Constant(value)); | 83 return AddNode(common()->Int64Constant(value)); |
87 } | 84 } |
88 Node* NumberConstant(double value) { | 85 Node* NumberConstant(double value) { |
89 return AddNode(common()->NumberConstant(value)); | 86 return AddNode(common()->NumberConstant(value)); |
90 } | 87 } |
91 Node* Float32Constant(float value) { | 88 Node* Float32Constant(float value) { |
92 return AddNode(common()->Float32Constant(value)); | 89 return AddNode(common()->Float32Constant(value)); |
93 } | 90 } |
94 Node* Float64Constant(double value) { | 91 Node* Float64Constant(double value) { |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 bool bound_; | 680 bool bound_; |
684 friend class RawMachineAssembler; | 681 friend class RawMachineAssembler; |
685 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); | 682 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); |
686 }; | 683 }; |
687 | 684 |
688 } // namespace compiler | 685 } // namespace compiler |
689 } // namespace internal | 686 } // namespace internal |
690 } // namespace v8 | 687 } // namespace v8 |
691 | 688 |
692 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 689 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
OLD | NEW |