| 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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 Type* Typer::Visitor::TypeCheckBounds(Node* node) { | 1739 Type* Typer::Visitor::TypeCheckBounds(Node* node) { |
| 1740 // TODO(bmeurer): We could do better here based on the limit. | 1740 // TODO(bmeurer): We could do better here based on the limit. |
| 1741 return Type::Unsigned31(); | 1741 return Type::Unsigned31(); |
| 1742 } | 1742 } |
| 1743 | 1743 |
| 1744 Type* Typer::Visitor::TypeCheckNumber(Node* node) { | 1744 Type* Typer::Visitor::TypeCheckNumber(Node* node) { |
| 1745 Type* arg = Operand(node, 0); | 1745 Type* arg = Operand(node, 0); |
| 1746 return Type::Intersect(arg, Type::Number(), zone()); | 1746 return Type::Intersect(arg, Type::Number(), zone()); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 Type* Typer::Visitor::TypeCheckIf(Node* node) { |
| 1750 UNREACHABLE(); |
| 1751 return nullptr; |
| 1752 } |
| 1753 |
| 1749 Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) { | 1754 Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) { |
| 1750 Type* arg = Operand(node, 0); | 1755 Type* arg = Operand(node, 0); |
| 1751 return Type::Intersect(arg, Type::TaggedPointer(), zone()); | 1756 return Type::Intersect(arg, Type::TaggedPointer(), zone()); |
| 1752 } | 1757 } |
| 1753 | 1758 |
| 1754 Type* Typer::Visitor::TypeCheckTaggedSigned(Node* node) { | 1759 Type* Typer::Visitor::TypeCheckTaggedSigned(Node* node) { |
| 1755 Type* arg = Operand(node, 0); | 1760 Type* arg = Operand(node, 0); |
| 1756 return Type::Intersect(arg, typer_->cache_.kSmi, zone()); | 1761 return Type::Intersect(arg, typer_->cache_.kSmi, zone()); |
| 1757 } | 1762 } |
| 1758 | 1763 |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 } | 2509 } |
| 2505 if (Type::IsInteger(*value)) { | 2510 if (Type::IsInteger(*value)) { |
| 2506 return Type::Range(value->Number(), value->Number(), zone()); | 2511 return Type::Range(value->Number(), value->Number(), zone()); |
| 2507 } | 2512 } |
| 2508 return Type::Constant(value, zone()); | 2513 return Type::Constant(value, zone()); |
| 2509 } | 2514 } |
| 2510 | 2515 |
| 2511 } // namespace compiler | 2516 } // namespace compiler |
| 2512 } // namespace internal | 2517 } // namespace internal |
| 2513 } // namespace v8 | 2518 } // namespace v8 |
| OLD | NEW |