| 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 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 | 1792 |
| 1793 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { | 1793 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { |
| 1794 return TypeUnaryOp(node, NumberToUint32); | 1794 return TypeUnaryOp(node, NumberToUint32); |
| 1795 } | 1795 } |
| 1796 | 1796 |
| 1797 | 1797 |
| 1798 Type* Typer::Visitor::TypeNumberIsHoleNaN(Node* node) { | 1798 Type* Typer::Visitor::TypeNumberIsHoleNaN(Node* node) { |
| 1799 return Type::Boolean(); | 1799 return Type::Boolean(); |
| 1800 } | 1800 } |
| 1801 | 1801 |
| 1802 | |
| 1803 Type* Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) { | |
| 1804 return TypeUnaryOp(node, ToNumber); | |
| 1805 } | |
| 1806 | |
| 1807 | |
| 1808 // static | 1802 // static |
| 1809 Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) { | 1803 Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) { |
| 1810 if (lhs->IsConstant() && rhs->Is(lhs)) { | 1804 if (lhs->IsConstant() && rhs->Is(lhs)) { |
| 1811 return t->singleton_true_; | 1805 return t->singleton_true_; |
| 1812 } | 1806 } |
| 1813 return Type::Boolean(); | 1807 return Type::Boolean(); |
| 1814 } | 1808 } |
| 1815 | 1809 |
| 1816 | 1810 |
| 1817 Type* Typer::Visitor::TypeReferenceEqual(Node* node) { | 1811 Type* Typer::Visitor::TypeReferenceEqual(Node* node) { |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 } | 2536 } |
| 2543 if (Type::IsInteger(*value)) { | 2537 if (Type::IsInteger(*value)) { |
| 2544 return Type::Range(value->Number(), value->Number(), zone()); | 2538 return Type::Range(value->Number(), value->Number(), zone()); |
| 2545 } | 2539 } |
| 2546 return Type::Constant(value, zone()); | 2540 return Type::Constant(value, zone()); |
| 2547 } | 2541 } |
| 2548 | 2542 |
| 2549 } // namespace compiler | 2543 } // namespace compiler |
| 2550 } // namespace internal | 2544 } // namespace internal |
| 2551 } // namespace v8 | 2545 } // namespace v8 |
| OLD | NEW |