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 } |
627 | 635 |
628 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { | 636 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { |
629 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), | 637 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), |
630 Type::UntaggedFloat32(), zone()); | 638 Type::UntaggedFloat32(), zone()); |
631 } | 639 } |
632 | 640 |
633 | 641 |
634 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { | 642 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { |
635 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), | 643 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), |
636 Type::UntaggedFloat64(), zone()); | 644 Type::UntaggedFloat64(), zone()); |
(...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2534 } | 2542 } |
2535 if (Type::IsInteger(*value)) { | 2543 if (Type::IsInteger(*value)) { |
2536 return Type::Range(value->Number(), value->Number(), zone()); | 2544 return Type::Range(value->Number(), value->Number(), zone()); |
2537 } | 2545 } |
2538 return Type::Constant(value, zone()); | 2546 return Type::Constant(value, zone()); |
2539 } | 2547 } |
2540 | 2548 |
2541 } // namespace compiler | 2549 } // namespace compiler |
2542 } // namespace internal | 2550 } // namespace internal |
2543 } // namespace v8 | 2551 } // namespace v8 |
OLD | NEW |