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 <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 Type* Typer::Visitor::TypeIfException(Node* node) { | 543 Type* Typer::Visitor::TypeIfException(Node* node) { |
544 return Type::NonInternal(); | 544 return Type::NonInternal(); |
545 } | 545 } |
546 | 546 |
547 // Common operators. | 547 // Common operators. |
548 | 548 |
549 Type* Typer::Visitor::TypeParameter(Node* node) { return Type::Any(); } | 549 Type* Typer::Visitor::TypeParameter(Node* node) { return Type::Any(); } |
550 | 550 |
551 Type* Typer::Visitor::TypeOsrValue(Node* node) { return Type::Any(); } | 551 Type* Typer::Visitor::TypeOsrValue(Node* node) { return Type::Any(); } |
552 | 552 |
553 Type* Typer::Visitor::TypeOsrGuard(Node* node) { | |
554 switch (OsrGuardTypeOf(node->op())) { | |
555 case OsrGuardType::kUninitialized: | |
556 return Type::None(); | |
557 case OsrGuardType::kSignedSmall: | |
558 return Type::SignedSmall(); | |
559 case OsrGuardType::kAny: | |
560 return Type::Any(); | |
561 } | |
562 UNREACHABLE(); | |
563 return nullptr; | |
564 } | |
565 | |
566 Type* Typer::Visitor::TypeRetain(Node* node) { | 553 Type* Typer::Visitor::TypeRetain(Node* node) { |
567 UNREACHABLE(); | 554 UNREACHABLE(); |
568 return nullptr; | 555 return nullptr; |
569 } | 556 } |
570 | 557 |
571 Type* Typer::Visitor::TypeInt32Constant(Node* node) { | 558 Type* Typer::Visitor::TypeInt32Constant(Node* node) { |
572 double number = OpParameter<int32_t>(node); | 559 double number = OpParameter<int32_t>(node); |
573 return Type::Intersect(Type::Range(number, number, zone()), | 560 return Type::Intersect(Type::Range(number, number, zone()), |
574 Type::Integral32(), zone()); | 561 Type::Integral32(), zone()); |
575 } | 562 } |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1716 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1730 if (Type::IsInteger(*value)) { | 1717 if (Type::IsInteger(*value)) { |
1731 return Type::Range(value->Number(), value->Number(), zone()); | 1718 return Type::Range(value->Number(), value->Number(), zone()); |
1732 } | 1719 } |
1733 return Type::Constant(value, zone()); | 1720 return Type::Constant(value, zone()); |
1734 } | 1721 } |
1735 | 1722 |
1736 } // namespace compiler | 1723 } // namespace compiler |
1737 } // namespace internal | 1724 } // namespace internal |
1738 } // namespace v8 | 1725 } // namespace v8 |
OLD | NEW |