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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { | 1670 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { |
1671 return TypeUnaryOp(node, NumberToInt32); | 1671 return TypeUnaryOp(node, NumberToInt32); |
1672 } | 1672 } |
1673 | 1673 |
1674 | 1674 |
1675 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { | 1675 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { |
1676 return TypeUnaryOp(node, NumberToUint32); | 1676 return TypeUnaryOp(node, NumberToUint32); |
1677 } | 1677 } |
1678 | 1678 |
1679 | 1679 |
| 1680 Type* Typer::Visitor::TypeNumberIsHoleNaN(Node* node) { |
| 1681 return Type::Boolean(zone()); |
| 1682 } |
| 1683 |
| 1684 |
1680 Type* Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) { | 1685 Type* Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) { |
1681 return TypeUnaryOp(node, ToNumber); | 1686 return TypeUnaryOp(node, ToNumber); |
1682 } | 1687 } |
1683 | 1688 |
1684 | 1689 |
1685 // static | 1690 // static |
1686 Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) { | 1691 Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) { |
1687 if (lhs->IsConstant() && rhs->Is(lhs)) { | 1692 if (lhs->IsConstant() && rhs->Is(lhs)) { |
1688 return t->singleton_true_; | 1693 return t->singleton_true_; |
1689 } | 1694 } |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 } | 2317 } |
2313 if (Type::IsInteger(*value)) { | 2318 if (Type::IsInteger(*value)) { |
2314 return Type::Range(value->Number(), value->Number(), zone()); | 2319 return Type::Range(value->Number(), value->Number(), zone()); |
2315 } | 2320 } |
2316 return Type::Constant(value, zone()); | 2321 return Type::Constant(value, zone()); |
2317 } | 2322 } |
2318 | 2323 |
2319 } // namespace compiler | 2324 } // namespace compiler |
2320 } // namespace internal | 2325 } // namespace internal |
2321 } // namespace v8 | 2326 } // namespace v8 |
OLD | NEW |