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_JS_GRAPH_H_ | 5 #ifndef V8_COMPILER_JS_GRAPH_H_ |
6 #define V8_COMPILER_JS_GRAPH_H_ | 6 #define V8_COMPILER_JS_GRAPH_H_ |
7 | 7 |
8 #include "src/compiler/common-node-cache.h" | 8 #include "src/compiler/common-node-cache.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // constants is probably not serializable. | 88 // constants is probably not serializable. |
89 Node* IntPtrConstant(intptr_t value) { | 89 Node* IntPtrConstant(intptr_t value) { |
90 return machine()->Is32() ? Int32Constant(static_cast<int32_t>(value)) | 90 return machine()->Is32() ? Int32Constant(static_cast<int32_t>(value)) |
91 : Int64Constant(static_cast<int64_t>(value)); | 91 : Int64Constant(static_cast<int64_t>(value)); |
92 } | 92 } |
93 template <typename T> | 93 template <typename T> |
94 Node* PointerConstant(T* value) { | 94 Node* PointerConstant(T* value) { |
95 return IntPtrConstant(bit_cast<intptr_t>(value)); | 95 return IntPtrConstant(bit_cast<intptr_t>(value)); |
96 } | 96 } |
97 | 97 |
| 98 Node* RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode); |
| 99 Node* RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode); |
| 100 Node* RelocatableIntPtrConstant(intptr_t value, RelocInfo::Mode rmode); |
| 101 |
98 // Creates a Float32Constant node, usually canonicalized. | 102 // Creates a Float32Constant node, usually canonicalized. |
99 Node* Float32Constant(float value); | 103 Node* Float32Constant(float value); |
100 | 104 |
101 // Creates a Float64Constant node, usually canonicalized. | 105 // Creates a Float64Constant node, usually canonicalized. |
102 Node* Float64Constant(double value); | 106 Node* Float64Constant(double value); |
103 | 107 |
104 // Creates an ExternalConstant node, usually canonicalized. | 108 // Creates an ExternalConstant node, usually canonicalized. |
105 Node* ExternalConstant(ExternalReference ref); | 109 Node* ExternalConstant(ExternalReference ref); |
106 Node* ExternalConstant(Runtime::FunctionId function_id); | 110 Node* ExternalConstant(Runtime::FunctionId function_id); |
107 | 111 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 Node* NumberConstant(double value); | 165 Node* NumberConstant(double value); |
162 | 166 |
163 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 167 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
164 }; | 168 }; |
165 | 169 |
166 } // namespace compiler | 170 } // namespace compiler |
167 } // namespace internal | 171 } // namespace internal |
168 } // namespace v8 | 172 } // namespace v8 |
169 | 173 |
170 #endif | 174 #endif |
OLD | NEW |