| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return Type::Intersect(Type::Range(number, number, zone()), | 617 return Type::Intersect(Type::Range(number, number, zone()), |
| 618 Type::UntaggedIntegral32(), zone()); | 618 Type::UntaggedIntegral32(), zone()); |
| 619 } | 619 } |
| 620 | 620 |
| 621 | 621 |
| 622 Type* Typer::Visitor::TypeInt64Constant(Node* node) { | 622 Type* Typer::Visitor::TypeInt64Constant(Node* node) { |
| 623 // TODO(rossberg): This actually seems to be a PointerConstant so far... | 623 // TODO(rossberg): This actually seems to be a PointerConstant so far... |
| 624 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? | 624 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? |
| 625 } | 625 } |
| 626 | 626 |
| 627 // TODO(gdeepti) : Fix this to do something meaningful. | |
| 628 Type* Typer::Visitor::TypeRelocatableInt32Constant(Node* node) { | |
| 629 return Type::Internal(); | |
| 630 } | |
| 631 | |
| 632 Type* Typer::Visitor::TypeRelocatableInt64Constant(Node* node) { | |
| 633 return Type::Internal(); | |
| 634 } | |
| 635 | 627 |
| 636 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { | 628 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { |
| 637 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), | 629 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), |
| 638 Type::UntaggedFloat32(), zone()); | 630 Type::UntaggedFloat32(), zone()); |
| 639 } | 631 } |
| 640 | 632 |
| 641 | 633 |
| 642 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { | 634 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { |
| 643 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), | 635 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), |
| 644 Type::UntaggedFloat64(), zone()); | 636 Type::UntaggedFloat64(), zone()); |
| (...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 } | 2534 } |
| 2543 if (Type::IsInteger(*value)) { | 2535 if (Type::IsInteger(*value)) { |
| 2544 return Type::Range(value->Number(), value->Number(), zone()); | 2536 return Type::Range(value->Number(), value->Number(), zone()); |
| 2545 } | 2537 } |
| 2546 return Type::Constant(value, zone()); | 2538 return Type::Constant(value, zone()); |
| 2547 } | 2539 } |
| 2548 | 2540 |
| 2549 } // namespace compiler | 2541 } // namespace compiler |
| 2550 } // namespace internal | 2542 } // namespace internal |
| 2551 } // namespace v8 | 2543 } // namespace v8 |
| OLD | NEW |