| 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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1605 Type* type = Operand(node, 0); | 1605 Type* type = Operand(node, 0); |
| 1606 return type; | 1606 return type; |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { | 1609 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { |
| 1610 Type* type = Operand(node, 0); | 1610 Type* type = Operand(node, 0); |
| 1611 type = Type::Intersect(type, Type::NonInternal(), zone()); | 1611 type = Type::Intersect(type, Type::NonInternal(), zone()); |
| 1612 return type; | 1612 return type; |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 Type* Typer::Visitor::TypeCheckHasInPrototypeChain(Node* node) { | |
| 1616 return Type::Boolean(); | |
| 1617 } | |
| 1618 | |
| 1619 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) { | 1615 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) { |
| 1620 Type* type = Operand(node, 0); | 1616 Type* type = Operand(node, 0); |
| 1621 if (type->Maybe(Type::Hole())) { | 1617 if (type->Maybe(Type::Hole())) { |
| 1622 // Turn "the hole" into undefined. | 1618 // Turn "the hole" into undefined. |
| 1623 type = Type::Intersect(type, Type::NonInternal(), zone()); | 1619 type = Type::Intersect(type, Type::NonInternal(), zone()); |
| 1624 type = Type::Union(type, Type::Undefined(), zone()); | 1620 type = Type::Union(type, Type::Undefined(), zone()); |
| 1625 } | 1621 } |
| 1626 return type; | 1622 return type; |
| 1627 } | 1623 } |
| 1628 | 1624 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1720 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1716 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1721 if (Type::IsInteger(*value)) { | 1717 if (Type::IsInteger(*value)) { |
| 1722 return Type::Range(value->Number(), value->Number(), zone()); | 1718 return Type::Range(value->Number(), value->Number(), zone()); |
| 1723 } | 1719 } |
| 1724 return Type::Constant(value, zone()); | 1720 return Type::Constant(value, zone()); |
| 1725 } | 1721 } |
| 1726 | 1722 |
| 1727 } // namespace compiler | 1723 } // namespace compiler |
| 1728 } // namespace internal | 1724 } // namespace internal |
| 1729 } // namespace v8 | 1725 } // namespace v8 |
| OLD | NEW |