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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Creates a NumberConstant node, usually canonicalized. | 63 // Creates a NumberConstant node, usually canonicalized. |
64 Node* Constant(int32_t value); | 64 Node* Constant(int32_t value); |
65 | 65 |
66 // Creates a Int32Constant node, usually canonicalized. | 66 // Creates a Int32Constant node, usually canonicalized. |
67 Node* Int32Constant(int32_t value); | 67 Node* Int32Constant(int32_t value); |
68 Node* Uint32Constant(uint32_t value) { | 68 Node* Uint32Constant(uint32_t value) { |
69 return Int32Constant(bit_cast<int32_t>(value)); | 69 return Int32Constant(bit_cast<int32_t>(value)); |
70 } | 70 } |
71 | 71 |
| 72 // Creates a Float32Constant node, usually canonicalized. |
| 73 Node* Float32Constant(float value); |
| 74 |
72 // Creates a Float64Constant node, usually canonicalized. | 75 // Creates a Float64Constant node, usually canonicalized. |
73 Node* Float64Constant(double value); | 76 Node* Float64Constant(double value); |
74 | 77 |
75 // Creates an ExternalConstant node, usually canonicalized. | 78 // Creates an ExternalConstant node, usually canonicalized. |
76 Node* ExternalConstant(ExternalReference ref); | 79 Node* ExternalConstant(ExternalReference ref); |
77 | 80 |
78 Node* SmiConstant(int32_t immediate) { | 81 Node* SmiConstant(int32_t immediate) { |
79 DCHECK(Smi::IsValid(immediate)); | 82 DCHECK(Smi::IsValid(immediate)); |
80 return Constant(immediate); | 83 return Constant(immediate); |
81 } | 84 } |
(...skipping 29 matching lines...) Expand all Loading... |
111 Node* NewNode(const Operator* op); | 114 Node* NewNode(const Operator* op); |
112 | 115 |
113 Factory* factory() { return isolate()->factory(); } | 116 Factory* factory() { return isolate()->factory(); } |
114 }; | 117 }; |
115 | 118 |
116 } // namespace compiler | 119 } // namespace compiler |
117 } // namespace internal | 120 } // namespace internal |
118 } // namespace v8 | 121 } // namespace v8 |
119 | 122 |
120 #endif | 123 #endif |
OLD | NEW |