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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 } | 696 } |
697 return type; | 697 return type; |
698 } | 698 } |
699 | 699 |
700 | 700 |
701 Type* Typer::Visitor::TypeEffectPhi(Node* node) { | 701 Type* Typer::Visitor::TypeEffectPhi(Node* node) { |
702 UNREACHABLE(); | 702 UNREACHABLE(); |
703 return nullptr; | 703 return nullptr; |
704 } | 704 } |
705 | 705 |
706 Type* Typer::Visitor::TypeTypeGuard(Node* node) { | |
707 Type* input_type = Operand(node, 0); | |
708 Type* guard_type = TypeOf(node->op()); | |
709 return Type::Intersect(input_type, guard_type, zone()); | |
710 } | |
711 | |
712 Type* Typer::Visitor::TypeCheckpoint(Node* node) { | 706 Type* Typer::Visitor::TypeCheckpoint(Node* node) { |
713 UNREACHABLE(); | 707 UNREACHABLE(); |
714 return nullptr; | 708 return nullptr; |
715 } | 709 } |
716 | 710 |
717 Type* Typer::Visitor::TypeBeginRegion(Node* node) { | 711 Type* Typer::Visitor::TypeBeginRegion(Node* node) { |
718 UNREACHABLE(); | 712 UNREACHABLE(); |
719 return nullptr; | 713 return nullptr; |
720 } | 714 } |
721 | 715 |
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 } | 2618 } |
2625 if (Type::IsInteger(*value)) { | 2619 if (Type::IsInteger(*value)) { |
2626 return Type::Range(value->Number(), value->Number(), zone()); | 2620 return Type::Range(value->Number(), value->Number(), zone()); |
2627 } | 2621 } |
2628 return Type::Constant(value, zone()); | 2622 return Type::Constant(value, zone()); |
2629 } | 2623 } |
2630 | 2624 |
2631 } // namespace compiler | 2625 } // namespace compiler |
2632 } // namespace internal | 2626 } // namespace internal |
2633 } // namespace v8 | 2627 } // namespace v8 |
OLD | NEW |