| 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/typer.h" | 5 #include "src/compiler/typer.h" |
| 6 | 6 |
| 7 #include "src/base/flags.h" | 7 #include "src/base/flags.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 return Type::Intersect(Type::Range(number, number, zone()), | 612 return Type::Intersect(Type::Range(number, number, zone()), |
| 613 Type::UntaggedIntegral32(), zone()); | 613 Type::UntaggedIntegral32(), zone()); |
| 614 } | 614 } |
| 615 | 615 |
| 616 | 616 |
| 617 Type* Typer::Visitor::TypeInt64Constant(Node* node) { | 617 Type* Typer::Visitor::TypeInt64Constant(Node* node) { |
| 618 // TODO(rossberg): This actually seems to be a PointerConstant so far... | 618 // TODO(rossberg): This actually seems to be a PointerConstant so far... |
| 619 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? | 619 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? |
| 620 } | 620 } |
| 621 | 621 |
| 622 // TODO(gdeepti) : Fix this to do something meaningful. | |
| 623 Type* Typer::Visitor::TypeRelocatableInt32Constant(Node* node) { | |
| 624 return Type::Internal(); | |
| 625 } | |
| 626 | |
| 627 Type* Typer::Visitor::TypeRelocatableInt64Constant(Node* node) { | |
| 628 return Type::Internal(); | |
| 629 } | |
| 630 | 622 |
| 631 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { | 623 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { |
| 632 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), | 624 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), |
| 633 Type::UntaggedFloat32(), zone()); | 625 Type::UntaggedFloat32(), zone()); |
| 634 } | 626 } |
| 635 | 627 |
| 636 | 628 |
| 637 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { | 629 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { |
| 638 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), | 630 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), |
| 639 Type::UntaggedFloat64(), zone()); | 631 Type::UntaggedFloat64(), zone()); |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2528 } | 2520 } |
| 2529 if (Type::IsInteger(*value)) { | 2521 if (Type::IsInteger(*value)) { |
| 2530 return Type::Range(value->Number(), value->Number(), zone()); | 2522 return Type::Range(value->Number(), value->Number(), zone()); |
| 2531 } | 2523 } |
| 2532 return Type::Constant(value, zone()); | 2524 return Type::Constant(value, zone()); |
| 2533 } | 2525 } |
| 2534 | 2526 |
| 2535 } // namespace compiler | 2527 } // namespace compiler |
| 2536 } // namespace internal | 2528 } // namespace internal |
| 2537 } // namespace v8 | 2529 } // namespace v8 |
| OLD | NEW |