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