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 23 matching lines...) Expand all Loading... |
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(); | 42 Node* AllocateInNewSpaceStubConstant(); |
43 Node* AllocateInOldSpaceStubConstant(); | 43 Node* AllocateInOldSpaceStubConstant(); |
| 44 Node* ToNumberBuiltinConstant(); |
44 Node* CEntryStubConstant(int result_size); | 45 Node* CEntryStubConstant(int result_size); |
45 Node* EmptyFixedArrayConstant(); | 46 Node* EmptyFixedArrayConstant(); |
46 Node* EmptyLiteralsArrayConstant(); | 47 Node* EmptyLiteralsArrayConstant(); |
47 Node* HeapNumberMapConstant(); | 48 Node* HeapNumberMapConstant(); |
48 Node* OptimizedOutConstant(); | 49 Node* OptimizedOutConstant(); |
49 Node* StaleRegisterConstant(); | 50 Node* StaleRegisterConstant(); |
50 Node* UndefinedConstant(); | 51 Node* UndefinedConstant(); |
51 Node* TheHoleConstant(); | 52 Node* TheHoleConstant(); |
52 Node* TrueConstant(); | 53 Node* TrueConstant(); |
53 Node* FalseConstant(); | 54 Node* FalseConstant(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 Zone* zone() const { return graph()->zone(); } | 140 Zone* zone() const { return graph()->zone(); } |
140 Isolate* isolate() const { return isolate_; } | 141 Isolate* isolate() const { return isolate_; } |
141 Factory* factory() const { return isolate()->factory(); } | 142 Factory* factory() const { return isolate()->factory(); } |
142 | 143 |
143 void GetCachedNodes(NodeVector* nodes); | 144 void GetCachedNodes(NodeVector* nodes); |
144 | 145 |
145 private: | 146 private: |
146 enum CachedNode { | 147 enum CachedNode { |
147 kAllocateInNewSpaceStubConstant, | 148 kAllocateInNewSpaceStubConstant, |
148 kAllocateInOldSpaceStubConstant, | 149 kAllocateInOldSpaceStubConstant, |
| 150 kToNumberBuiltinConstant, |
149 kCEntryStubConstant, | 151 kCEntryStubConstant, |
150 kEmptyFixedArrayConstant, | 152 kEmptyFixedArrayConstant, |
151 kEmptyLiteralsArrayConstant, | 153 kEmptyLiteralsArrayConstant, |
152 kHeapNumberMapConstant, | 154 kHeapNumberMapConstant, |
153 kOptimizedOutConstant, | 155 kOptimizedOutConstant, |
154 kStaleRegisterConstant, | 156 kStaleRegisterConstant, |
155 kUndefinedConstant, | 157 kUndefinedConstant, |
156 kTheHoleConstant, | 158 kTheHoleConstant, |
157 kTrueConstant, | 159 kTrueConstant, |
158 kFalseConstant, | 160 kFalseConstant, |
(...skipping 18 matching lines...) Expand all Loading... |
177 Node* NumberConstant(double value); | 179 Node* NumberConstant(double value); |
178 | 180 |
179 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 181 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
180 }; | 182 }; |
181 | 183 |
182 } // namespace compiler | 184 } // namespace compiler |
183 } // namespace internal | 185 } // namespace internal |
184 } // namespace v8 | 186 } // namespace v8 |
185 | 187 |
186 #endif | 188 #endif |
OLD | NEW |