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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 692 } |
693 return type; | 693 return type; |
694 } | 694 } |
695 | 695 |
696 | 696 |
697 Type* Typer::Visitor::TypeEffectPhi(Node* node) { | 697 Type* Typer::Visitor::TypeEffectPhi(Node* node) { |
698 UNREACHABLE(); | 698 UNREACHABLE(); |
699 return nullptr; | 699 return nullptr; |
700 } | 700 } |
701 | 701 |
702 | 702 Type* Typer::Visitor::TypeTypeGuard(Node* node) { |
703 Type* Typer::Visitor::TypeGuard(Node* node) { | |
704 Type* input_type = Operand(node, 0); | 703 Type* input_type = Operand(node, 0); |
705 Type* guard_type = OpParameter<Type*>(node); | 704 Type* guard_type = TypeOf(node->op()); |
706 return Type::Intersect(input_type, guard_type, zone()); | 705 return Type::Intersect(input_type, guard_type, zone()); |
707 } | 706 } |
708 | 707 |
709 Type* Typer::Visitor::TypeCheckPoint(Node* node) { | 708 Type* Typer::Visitor::TypeCheckPoint(Node* node) { |
710 UNREACHABLE(); | 709 UNREACHABLE(); |
711 return nullptr; | 710 return nullptr; |
712 } | 711 } |
713 | 712 |
714 Type* Typer::Visitor::TypeBeginRegion(Node* node) { | 713 Type* Typer::Visitor::TypeBeginRegion(Node* node) { |
715 UNREACHABLE(); | 714 UNREACHABLE(); |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 } | 2576 } |
2578 if (Type::IsInteger(*value)) { | 2577 if (Type::IsInteger(*value)) { |
2579 return Type::Range(value->Number(), value->Number(), zone()); | 2578 return Type::Range(value->Number(), value->Number(), zone()); |
2580 } | 2579 } |
2581 return Type::Constant(value, zone()); | 2580 return Type::Constant(value, zone()); |
2582 } | 2581 } |
2583 | 2582 |
2584 } // namespace compiler | 2583 } // namespace compiler |
2585 } // namespace internal | 2584 } // namespace internal |
2586 } // namespace v8 | 2585 } // namespace v8 |
OLD | NEW |