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 #include "src/compiler/graph-inl.h" | 5 #include "src/compiler/graph-inl.h" |
6 #include "src/compiler/js-operator.h" | 6 #include "src/compiler/js-operator.h" |
7 #include "src/compiler/node.h" | 7 #include "src/compiler/node.h" |
8 #include "src/compiler/node-properties-inl.h" | 8 #include "src/compiler/node-properties-inl.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 | 206 |
207 // Common operators. | 207 // Common operators. |
208 Bounds Typer::Visitor::TypeParameter(Node* node) { | 208 Bounds Typer::Visitor::TypeParameter(Node* node) { |
209 return Bounds::Unbounded(zone()); | 209 return Bounds::Unbounded(zone()); |
210 } | 210 } |
211 | 211 |
212 | 212 |
213 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { | 213 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { |
214 // TODO(titzer): only call Type::Of() if the type is not already known. | 214 // TODO(titzer): only call Type::Of() if the type is not already known. |
215 return Bounds(Type::Of(ValueOf<int32_t>(node->op()), zone())); | 215 return Bounds(Type::Of(OpParameter<int32_t>(node), zone())); |
216 } | 216 } |
217 | 217 |
218 | 218 |
219 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { | 219 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { |
220 // TODO(titzer): only call Type::Of() if the type is not already known. | 220 // TODO(titzer): only call Type::Of() if the type is not already known. |
221 return Bounds( | 221 return Bounds( |
222 Type::Of(static_cast<double>(ValueOf<int64_t>(node->op())), zone())); | 222 Type::Of(static_cast<double>(OpParameter<int64_t>(node)), zone())); |
223 } | 223 } |
224 | 224 |
225 | 225 |
226 Bounds Typer::Visitor::TypeFloat64Constant(Node* node) { | 226 Bounds Typer::Visitor::TypeFloat64Constant(Node* node) { |
227 // TODO(titzer): only call Type::Of() if the type is not already known. | 227 // TODO(titzer): only call Type::Of() if the type is not already known. |
228 return Bounds(Type::Of(ValueOf<double>(node->op()), zone())); | 228 return Bounds(Type::Of(OpParameter<double>(node), zone())); |
229 } | 229 } |
230 | 230 |
231 | 231 |
232 Bounds Typer::Visitor::TypeNumberConstant(Node* node) { | 232 Bounds Typer::Visitor::TypeNumberConstant(Node* node) { |
233 // TODO(titzer): only call Type::Of() if the type is not already known. | 233 // TODO(titzer): only call Type::Of() if the type is not already known. |
234 return Bounds(Type::Of(ValueOf<double>(node->op()), zone())); | 234 return Bounds(Type::Of(OpParameter<double>(node), zone())); |
235 } | 235 } |
236 | 236 |
237 | 237 |
238 Bounds Typer::Visitor::TypeHeapConstant(Node* node) { | 238 Bounds Typer::Visitor::TypeHeapConstant(Node* node) { |
239 return Bounds(TypeConstant(ValueOf<Handle<Object> >(node->op()))); | 239 return Bounds(TypeConstant(OpParameter<Unique<Object> >(node).handle())); |
240 } | 240 } |
241 | 241 |
242 | 242 |
243 Bounds Typer::Visitor::TypeExternalConstant(Node* node) { | 243 Bounds Typer::Visitor::TypeExternalConstant(Node* node) { |
244 return Bounds(Type::Internal(zone())); | 244 return Bounds(Type::Internal(zone())); |
245 } | 245 } |
246 | 246 |
247 | 247 |
248 Bounds Typer::Visitor::TypePhi(Node* node) { | 248 Bounds Typer::Visitor::TypePhi(Node* node) { |
249 int arity = OperatorProperties::GetValueInputCount(node->op()); | 249 int arity = OperatorProperties::GetValueInputCount(node->op()); |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 } | 846 } |
847 | 847 |
848 | 848 |
849 void Typer::DecorateGraph(Graph* graph) { | 849 void Typer::DecorateGraph(Graph* graph) { |
850 graph->AddDecorator(new (zone()) TyperDecorator(this)); | 850 graph->AddDecorator(new (zone()) TyperDecorator(this)); |
851 } | 851 } |
852 | 852 |
853 } | 853 } |
854 } | 854 } |
855 } // namespace v8::internal::compiler | 855 } // namespace v8::internal::compiler |
OLD | NEW |