| 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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 case Runtime::kInlineIsSmi: | 1603 case Runtime::kInlineIsSmi: |
| 1604 return TypeUnaryOp(node, ObjectIsSmi); | 1604 return TypeUnaryOp(node, ObjectIsSmi); |
| 1605 case Runtime::kInlineIsArray: | 1605 case Runtime::kInlineIsArray: |
| 1606 case Runtime::kInlineIsDate: | 1606 case Runtime::kInlineIsDate: |
| 1607 case Runtime::kInlineIsTypedArray: | 1607 case Runtime::kInlineIsTypedArray: |
| 1608 case Runtime::kInlineIsRegExp: | 1608 case Runtime::kInlineIsRegExp: |
| 1609 return Type::Boolean(); | 1609 return Type::Boolean(); |
| 1610 case Runtime::kInlineDoubleLo: | 1610 case Runtime::kInlineDoubleLo: |
| 1611 case Runtime::kInlineDoubleHi: | 1611 case Runtime::kInlineDoubleHi: |
| 1612 return Type::Signed32(); | 1612 return Type::Signed32(); |
| 1613 case Runtime::kInlineConstructDouble: | |
| 1614 return Type::Number(); | |
| 1615 case Runtime::kInlineCreateIterResultObject: | 1613 case Runtime::kInlineCreateIterResultObject: |
| 1616 case Runtime::kInlineRegExpConstructResult: | 1614 case Runtime::kInlineRegExpConstructResult: |
| 1617 return Type::OtherObject(); | 1615 return Type::OtherObject(); |
| 1618 case Runtime::kInlineSubString: | 1616 case Runtime::kInlineSubString: |
| 1619 case Runtime::kInlineStringCharFromCode: | 1617 case Runtime::kInlineStringCharFromCode: |
| 1620 return Type::String(); | 1618 return Type::String(); |
| 1621 case Runtime::kInlineToInteger: | 1619 case Runtime::kInlineToInteger: |
| 1622 return TypeUnaryOp(node, ToInteger); | 1620 return TypeUnaryOp(node, ToInteger); |
| 1623 case Runtime::kInlineToLength: | 1621 case Runtime::kInlineToLength: |
| 1624 return TypeUnaryOp(node, ToLength); | 1622 return TypeUnaryOp(node, ToLength); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } | 1833 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } |
| 1836 | 1834 |
| 1837 Type* Typer::Visitor::TypeNumberRound(Node* node) { | 1835 Type* Typer::Visitor::TypeNumberRound(Node* node) { |
| 1838 return TypeUnaryOp(node, NumberRound); | 1836 return TypeUnaryOp(node, NumberRound); |
| 1839 } | 1837 } |
| 1840 | 1838 |
| 1841 Type* Typer::Visitor::TypeNumberSin(Node* node) { return Type::Number(); } | 1839 Type* Typer::Visitor::TypeNumberSin(Node* node) { return Type::Number(); } |
| 1842 | 1840 |
| 1843 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } | 1841 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } |
| 1844 | 1842 |
| 1843 Type* Typer::Visitor::TypeNumberTan(Node* node) { return Type::Number(); } |
| 1844 |
| 1845 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { | 1845 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { |
| 1846 return TypeUnaryOp(node, NumberTrunc); | 1846 return TypeUnaryOp(node, NumberTrunc); |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { | 1849 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { |
| 1850 return TypeUnaryOp(node, NumberToInt32); | 1850 return TypeUnaryOp(node, NumberToInt32); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 | 1853 |
| 1854 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { | 1854 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2604 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } | 2604 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } |
| 2605 | 2605 |
| 2606 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } | 2606 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } |
| 2607 | 2607 |
| 2608 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } | 2608 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } |
| 2609 | 2609 |
| 2610 Type* Typer::Visitor::TypeFloat64Sin(Node* node) { return Type::Number(); } | 2610 Type* Typer::Visitor::TypeFloat64Sin(Node* node) { return Type::Number(); } |
| 2611 | 2611 |
| 2612 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } | 2612 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } |
| 2613 | 2613 |
| 2614 Type* Typer::Visitor::TypeFloat64Tan(Node* node) { return Type::Number(); } |
| 2614 | 2615 |
| 2615 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } | 2616 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } |
| 2616 | 2617 |
| 2617 | 2618 |
| 2618 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { | 2619 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { |
| 2619 return Type::Boolean(); | 2620 return Type::Boolean(); |
| 2620 } | 2621 } |
| 2621 | 2622 |
| 2622 | 2623 |
| 2623 Type* Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) { | 2624 Type* Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 } | 2771 } |
| 2771 if (Type::IsInteger(*value)) { | 2772 if (Type::IsInteger(*value)) { |
| 2772 return Type::Range(value->Number(), value->Number(), zone()); | 2773 return Type::Range(value->Number(), value->Number(), zone()); |
| 2773 } | 2774 } |
| 2774 return Type::Constant(value, zone()); | 2775 return Type::Constant(value, zone()); |
| 2775 } | 2776 } |
| 2776 | 2777 |
| 2777 } // namespace compiler | 2778 } // namespace compiler |
| 2778 } // namespace internal | 2779 } // namespace internal |
| 2779 } // namespace v8 | 2780 } // namespace v8 |
| OLD | NEW |