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 21 matching lines...) Expand all Loading... |
32 graph_(graph), | 32 graph_(graph), |
33 common_(common), | 33 common_(common), |
34 javascript_(javascript), | 34 javascript_(javascript), |
35 simplified_(simplified), | 35 simplified_(simplified), |
36 machine_(machine), | 36 machine_(machine), |
37 cache_(zone()) { | 37 cache_(zone()) { |
38 for (int i = 0; i < kNumCachedNodes; i++) cached_nodes_[i] = nullptr; | 38 for (int i = 0; i < kNumCachedNodes; i++) cached_nodes_[i] = nullptr; |
39 } | 39 } |
40 | 40 |
41 // Canonicalized global constants. | 41 // Canonicalized global constants. |
| 42 Node* AllocateInNewSpaceStubConstant(); |
| 43 Node* AllocateInOldSpaceStubConstant(); |
42 Node* CEntryStubConstant(int result_size); | 44 Node* CEntryStubConstant(int result_size); |
43 Node* EmptyFixedArrayConstant(); | 45 Node* EmptyFixedArrayConstant(); |
44 Node* HeapNumberMapConstant(); | 46 Node* HeapNumberMapConstant(); |
45 Node* OptimizedOutConstant(); | 47 Node* OptimizedOutConstant(); |
46 Node* UndefinedConstant(); | 48 Node* UndefinedConstant(); |
47 Node* TheHoleConstant(); | 49 Node* TheHoleConstant(); |
48 Node* TrueConstant(); | 50 Node* TrueConstant(); |
49 Node* FalseConstant(); | 51 Node* FalseConstant(); |
50 Node* NullConstant(); | 52 Node* NullConstant(); |
51 Node* ZeroConstant(); | 53 Node* ZeroConstant(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 MachineOperatorBuilder* machine() const { return machine_; } | 135 MachineOperatorBuilder* machine() const { return machine_; } |
134 Graph* graph() const { return graph_; } | 136 Graph* graph() const { return graph_; } |
135 Zone* zone() const { return graph()->zone(); } | 137 Zone* zone() const { return graph()->zone(); } |
136 Isolate* isolate() const { return isolate_; } | 138 Isolate* isolate() const { return isolate_; } |
137 Factory* factory() const { return isolate()->factory(); } | 139 Factory* factory() const { return isolate()->factory(); } |
138 | 140 |
139 void GetCachedNodes(NodeVector* nodes); | 141 void GetCachedNodes(NodeVector* nodes); |
140 | 142 |
141 private: | 143 private: |
142 enum CachedNode { | 144 enum CachedNode { |
| 145 kAllocateInNewSpaceStubConstant, |
| 146 kAllocateInOldSpaceStubConstant, |
143 kCEntryStubConstant, | 147 kCEntryStubConstant, |
144 kEmptyFixedArrayConstant, | 148 kEmptyFixedArrayConstant, |
145 kHeapNumberMapConstant, | 149 kHeapNumberMapConstant, |
146 kOptimizedOutConstant, | 150 kOptimizedOutConstant, |
147 kUndefinedConstant, | 151 kUndefinedConstant, |
148 kTheHoleConstant, | 152 kTheHoleConstant, |
149 kTrueConstant, | 153 kTrueConstant, |
150 kFalseConstant, | 154 kFalseConstant, |
151 kNullConstant, | 155 kNullConstant, |
152 kZeroConstant, | 156 kZeroConstant, |
(...skipping 16 matching lines...) Expand all Loading... |
169 Node* NumberConstant(double value); | 173 Node* NumberConstant(double value); |
170 | 174 |
171 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 175 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
172 }; | 176 }; |
173 | 177 |
174 } // namespace compiler | 178 } // namespace compiler |
175 } // namespace internal | 179 } // namespace internal |
176 } // namespace v8 | 180 } // namespace v8 |
177 | 181 |
178 #endif | 182 #endif |
OLD | NEW |