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 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 } | 1796 } |
1797 | 1797 |
1798 Type* Typer::Visitor::TypeNumberFround(Node* node) { return Type::Number(); } | 1798 Type* Typer::Visitor::TypeNumberFround(Node* node) { return Type::Number(); } |
1799 | 1799 |
1800 Type* Typer::Visitor::TypeNumberAtan(Node* node) { return Type::Number(); } | 1800 Type* Typer::Visitor::TypeNumberAtan(Node* node) { return Type::Number(); } |
1801 | 1801 |
1802 Type* Typer::Visitor::TypeNumberAtan2(Node* node) { return Type::Number(); } | 1802 Type* Typer::Visitor::TypeNumberAtan2(Node* node) { return Type::Number(); } |
1803 | 1803 |
1804 Type* Typer::Visitor::TypeNumberAtanh(Node* node) { return Type::Number(); } | 1804 Type* Typer::Visitor::TypeNumberAtanh(Node* node) { return Type::Number(); } |
1805 | 1805 |
| 1806 Type* Typer::Visitor::TypeNumberCos(Node* node) { return Type::Number(); } |
| 1807 |
1806 Type* Typer::Visitor::TypeNumberExp(Node* node) { | 1808 Type* Typer::Visitor::TypeNumberExp(Node* node) { |
1807 return Type::Union(Type::PlainNumber(), Type::NaN(), zone()); | 1809 return Type::Union(Type::PlainNumber(), Type::NaN(), zone()); |
1808 } | 1810 } |
1809 | 1811 |
1810 // TODO(mvstanton): Is this type sufficient, or should it look like Exp()? | 1812 // TODO(mvstanton): Is this type sufficient, or should it look like Exp()? |
1811 Type* Typer::Visitor::TypeNumberExpm1(Node* node) { return Type::Number(); } | 1813 Type* Typer::Visitor::TypeNumberExpm1(Node* node) { return Type::Number(); } |
1812 | 1814 |
1813 Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); } | 1815 Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); } |
1814 | 1816 |
1815 Type* Typer::Visitor::TypeNumberLog1p(Node* node) { return Type::Number(); } | 1817 Type* Typer::Visitor::TypeNumberLog1p(Node* node) { return Type::Number(); } |
1816 | 1818 |
1817 Type* Typer::Visitor::TypeNumberLog2(Node* node) { return Type::Number(); } | 1819 Type* Typer::Visitor::TypeNumberLog2(Node* node) { return Type::Number(); } |
1818 | 1820 |
1819 Type* Typer::Visitor::TypeNumberLog10(Node* node) { return Type::Number(); } | 1821 Type* Typer::Visitor::TypeNumberLog10(Node* node) { return Type::Number(); } |
1820 | 1822 |
1821 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } | 1823 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } |
1822 | 1824 |
1823 Type* Typer::Visitor::TypeNumberRound(Node* node) { | 1825 Type* Typer::Visitor::TypeNumberRound(Node* node) { |
1824 return TypeUnaryOp(node, NumberRound); | 1826 return TypeUnaryOp(node, NumberRound); |
1825 } | 1827 } |
1826 | 1828 |
| 1829 Type* Typer::Visitor::TypeNumberSin(Node* node) { return Type::Number(); } |
| 1830 |
1827 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } | 1831 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } |
1828 | 1832 |
1829 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { | 1833 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { |
1830 return TypeUnaryOp(node, NumberTrunc); | 1834 return TypeUnaryOp(node, NumberTrunc); |
1831 } | 1835 } |
1832 | 1836 |
1833 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { | 1837 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { |
1834 return TypeUnaryOp(node, NumberToInt32); | 1838 return TypeUnaryOp(node, NumberToInt32); |
1835 } | 1839 } |
1836 | 1840 |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2566 // TODO(turbofan): We should be able to infer a better type here. | 2570 // TODO(turbofan): We should be able to infer a better type here. |
2567 return Type::Number(); | 2571 return Type::Number(); |
2568 } | 2572 } |
2569 | 2573 |
2570 Type* Typer::Visitor::TypeFloat64Atan(Node* node) { return Type::Number(); } | 2574 Type* Typer::Visitor::TypeFloat64Atan(Node* node) { return Type::Number(); } |
2571 | 2575 |
2572 Type* Typer::Visitor::TypeFloat64Atan2(Node* node) { return Type::Number(); } | 2576 Type* Typer::Visitor::TypeFloat64Atan2(Node* node) { return Type::Number(); } |
2573 | 2577 |
2574 Type* Typer::Visitor::TypeFloat64Atanh(Node* node) { return Type::Number(); } | 2578 Type* Typer::Visitor::TypeFloat64Atanh(Node* node) { return Type::Number(); } |
2575 | 2579 |
| 2580 Type* Typer::Visitor::TypeFloat64Cos(Node* node) { return Type::Number(); } |
| 2581 |
2576 Type* Typer::Visitor::TypeFloat64Exp(Node* node) { return Type::Number(); } | 2582 Type* Typer::Visitor::TypeFloat64Exp(Node* node) { return Type::Number(); } |
2577 | 2583 |
2578 Type* Typer::Visitor::TypeFloat64Expm1(Node* node) { return Type::Number(); } | 2584 Type* Typer::Visitor::TypeFloat64Expm1(Node* node) { return Type::Number(); } |
2579 | 2585 |
2580 Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); } | 2586 Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); } |
2581 | 2587 |
2582 Type* Typer::Visitor::TypeFloat64Log1p(Node* node) { return Type::Number(); } | 2588 Type* Typer::Visitor::TypeFloat64Log1p(Node* node) { return Type::Number(); } |
2583 | 2589 |
2584 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } | 2590 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } |
2585 | 2591 |
2586 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } | 2592 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } |
2587 | 2593 |
2588 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } | 2594 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } |
2589 | 2595 |
| 2596 Type* Typer::Visitor::TypeFloat64Sin(Node* node) { return Type::Number(); } |
| 2597 |
2590 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } | 2598 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } |
2591 | 2599 |
2592 | 2600 |
2593 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } | 2601 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } |
2594 | 2602 |
2595 | 2603 |
2596 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { | 2604 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { |
2597 return Type::Boolean(); | 2605 return Type::Boolean(); |
2598 } | 2606 } |
2599 | 2607 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2748 } | 2756 } |
2749 if (Type::IsInteger(*value)) { | 2757 if (Type::IsInteger(*value)) { |
2750 return Type::Range(value->Number(), value->Number(), zone()); | 2758 return Type::Range(value->Number(), value->Number(), zone()); |
2751 } | 2759 } |
2752 return Type::Constant(value, zone()); | 2760 return Type::Constant(value, zone()); |
2753 } | 2761 } |
2754 | 2762 |
2755 } // namespace compiler | 2763 } // namespace compiler |
2756 } // namespace internal | 2764 } // namespace internal |
2757 } // namespace v8 | 2765 } // namespace v8 |
OLD | NEW |