| 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 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 Type* Typer::Visitor::TypeCheckHeapObject(Node* node) { | 1709 Type* Typer::Visitor::TypeCheckHeapObject(Node* node) { |
| 1710 Type* type = Operand(node, 0); | 1710 Type* type = Operand(node, 0); |
| 1711 return type; | 1711 return type; |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 Type* Typer::Visitor::TypeCheckIf(Node* node) { | 1714 Type* Typer::Visitor::TypeCheckIf(Node* node) { |
| 1715 UNREACHABLE(); | 1715 UNREACHABLE(); |
| 1716 return nullptr; | 1716 return nullptr; |
| 1717 } | 1717 } |
| 1718 | 1718 |
| 1719 Type* Typer::Visitor::TypeCheckInternalizedString(Node* node) { |
| 1720 Type* arg = Operand(node, 0); |
| 1721 return Type::Intersect(arg, Type::InternalizedString(), zone()); |
| 1722 } |
| 1723 |
| 1719 Type* Typer::Visitor::TypeCheckMaps(Node* node) { | 1724 Type* Typer::Visitor::TypeCheckMaps(Node* node) { |
| 1720 UNREACHABLE(); | 1725 UNREACHABLE(); |
| 1721 return nullptr; | 1726 return nullptr; |
| 1722 } | 1727 } |
| 1723 | 1728 |
| 1724 Type* Typer::Visitor::TypeCheckNumber(Node* node) { | 1729 Type* Typer::Visitor::TypeCheckNumber(Node* node) { |
| 1725 Type* arg = Operand(node, 0); | 1730 Type* arg = Operand(node, 0); |
| 1726 return Type::Intersect(arg, Type::Number(), zone()); | 1731 return Type::Intersect(arg, Type::Number(), zone()); |
| 1727 } | 1732 } |
| 1728 | 1733 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1862 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1858 if (Type::IsInteger(*value)) { | 1863 if (Type::IsInteger(*value)) { |
| 1859 return Type::Range(value->Number(), value->Number(), zone()); | 1864 return Type::Range(value->Number(), value->Number(), zone()); |
| 1860 } | 1865 } |
| 1861 return Type::NewConstant(value, zone()); | 1866 return Type::NewConstant(value, zone()); |
| 1862 } | 1867 } |
| 1863 | 1868 |
| 1864 } // namespace compiler | 1869 } // namespace compiler |
| 1865 } // namespace internal | 1870 } // namespace internal |
| 1866 } // namespace v8 | 1871 } // namespace v8 |
| OLD | NEW |