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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 248 } |
249 | 249 |
250 | 250 |
251 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { | 251 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { |
252 // TODO(titzer): only call Type::Of() if the type is not already known. | 252 // TODO(titzer): only call Type::Of() if the type is not already known. |
253 return Bounds( | 253 return Bounds( |
254 Type::Of(static_cast<double>(OpParameter<int64_t>(node)), zone())); | 254 Type::Of(static_cast<double>(OpParameter<int64_t>(node)), zone())); |
255 } | 255 } |
256 | 256 |
257 | 257 |
| 258 Bounds Typer::Visitor::TypeFloat32Constant(Node* node) { |
| 259 // TODO(titzer): only call Type::Of() if the type is not already known. |
| 260 return Bounds(Type::Of(OpParameter<float>(node), zone())); |
| 261 } |
| 262 |
| 263 |
258 Bounds Typer::Visitor::TypeFloat64Constant(Node* node) { | 264 Bounds Typer::Visitor::TypeFloat64Constant(Node* node) { |
259 // TODO(titzer): only call Type::Of() if the type is not already known. | 265 // TODO(titzer): only call Type::Of() if the type is not already known. |
260 return Bounds(Type::Of(OpParameter<double>(node), zone())); | 266 return Bounds(Type::Of(OpParameter<double>(node), zone())); |
261 } | 267 } |
262 | 268 |
263 | 269 |
264 Bounds Typer::Visitor::TypeNumberConstant(Node* node) { | 270 Bounds Typer::Visitor::TypeNumberConstant(Node* node) { |
265 // TODO(titzer): only call Type::Of() if the type is not already known. | 271 // TODO(titzer): only call Type::Of() if the type is not already known. |
266 return Bounds(Type::Of(OpParameter<double>(node), zone())); | 272 return Bounds(Type::Of(OpParameter<double>(node), zone())); |
267 } | 273 } |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 } | 895 } |
890 | 896 |
891 | 897 |
892 void Typer::DecorateGraph(Graph* graph) { | 898 void Typer::DecorateGraph(Graph* graph) { |
893 graph->AddDecorator(new (zone()) TyperDecorator(this)); | 899 graph->AddDecorator(new (zone()) TyperDecorator(this)); |
894 } | 900 } |
895 | 901 |
896 } | 902 } |
897 } | 903 } |
898 } // namespace v8::internal::compiler | 904 } // namespace v8::internal::compiler |
OLD | NEW |