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 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1644 Type* Typer::Visitor::TypeNumberFround(Node* node) { return Type::Number(); } | 1644 Type* Typer::Visitor::TypeNumberFround(Node* node) { return Type::Number(); } |
1645 | 1645 |
1646 Type* Typer::Visitor::TypeNumberAtan(Node* node) { return Type::Number(); } | 1646 Type* Typer::Visitor::TypeNumberAtan(Node* node) { return Type::Number(); } |
1647 | 1647 |
1648 Type* Typer::Visitor::TypeNumberAtan2(Node* node) { return Type::Number(); } | 1648 Type* Typer::Visitor::TypeNumberAtan2(Node* node) { return Type::Number(); } |
1649 | 1649 |
1650 Type* Typer::Visitor::TypeNumberAtanh(Node* node) { return Type::Number(); } | 1650 Type* Typer::Visitor::TypeNumberAtanh(Node* node) { return Type::Number(); } |
1651 | 1651 |
1652 Type* Typer::Visitor::TypeNumberCos(Node* node) { return Type::Number(); } | 1652 Type* Typer::Visitor::TypeNumberCos(Node* node) { return Type::Number(); } |
1653 | 1653 |
| 1654 Type* Typer::Visitor::TypeNumberCosh(Node* node) { return Type::Number(); } |
| 1655 |
1654 Type* Typer::Visitor::TypeNumberExp(Node* node) { | 1656 Type* Typer::Visitor::TypeNumberExp(Node* node) { |
1655 return Type::Union(Type::PlainNumber(), Type::NaN(), zone()); | 1657 return Type::Union(Type::PlainNumber(), Type::NaN(), zone()); |
1656 } | 1658 } |
1657 | 1659 |
1658 // TODO(mvstanton): Is this type sufficient, or should it look like Exp()? | 1660 // TODO(mvstanton): Is this type sufficient, or should it look like Exp()? |
1659 Type* Typer::Visitor::TypeNumberExpm1(Node* node) { return Type::Number(); } | 1661 Type* Typer::Visitor::TypeNumberExpm1(Node* node) { return Type::Number(); } |
1660 | 1662 |
1661 Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); } | 1663 Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); } |
1662 | 1664 |
1663 Type* Typer::Visitor::TypeNumberLog1p(Node* node) { return Type::Number(); } | 1665 Type* Typer::Visitor::TypeNumberLog1p(Node* node) { return Type::Number(); } |
1664 | 1666 |
1665 Type* Typer::Visitor::TypeNumberLog2(Node* node) { return Type::Number(); } | 1667 Type* Typer::Visitor::TypeNumberLog2(Node* node) { return Type::Number(); } |
1666 | 1668 |
1667 Type* Typer::Visitor::TypeNumberLog10(Node* node) { return Type::Number(); } | 1669 Type* Typer::Visitor::TypeNumberLog10(Node* node) { return Type::Number(); } |
1668 | 1670 |
1669 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } | 1671 Type* Typer::Visitor::TypeNumberCbrt(Node* node) { return Type::Number(); } |
1670 | 1672 |
1671 Type* Typer::Visitor::TypeNumberPow(Node* node) { return Type::Number(); } | 1673 Type* Typer::Visitor::TypeNumberPow(Node* node) { return Type::Number(); } |
1672 | 1674 |
1673 Type* Typer::Visitor::TypeNumberRound(Node* node) { | 1675 Type* Typer::Visitor::TypeNumberRound(Node* node) { |
1674 return TypeUnaryOp(node, NumberRound); | 1676 return TypeUnaryOp(node, NumberRound); |
1675 } | 1677 } |
1676 | 1678 |
1677 Type* Typer::Visitor::TypeNumberSin(Node* node) { return Type::Number(); } | 1679 Type* Typer::Visitor::TypeNumberSin(Node* node) { return Type::Number(); } |
1678 | 1680 |
| 1681 Type* Typer::Visitor::TypeNumberSinh(Node* node) { return Type::Number(); } |
| 1682 |
1679 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } | 1683 Type* Typer::Visitor::TypeNumberSqrt(Node* node) { return Type::Number(); } |
1680 | 1684 |
1681 Type* Typer::Visitor::TypeNumberTan(Node* node) { return Type::Number(); } | 1685 Type* Typer::Visitor::TypeNumberTan(Node* node) { return Type::Number(); } |
1682 | 1686 |
| 1687 Type* Typer::Visitor::TypeNumberTanh(Node* node) { return Type::Number(); } |
| 1688 |
1683 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { | 1689 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { |
1684 return TypeUnaryOp(node, NumberTrunc); | 1690 return TypeUnaryOp(node, NumberTrunc); |
1685 } | 1691 } |
1686 | 1692 |
1687 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { | 1693 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { |
1688 return TypeUnaryOp(node, NumberToInt32); | 1694 return TypeUnaryOp(node, NumberToInt32); |
1689 } | 1695 } |
1690 | 1696 |
1691 | 1697 |
1692 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { | 1698 Type* Typer::Visitor::TypeNumberToUint32(Node* node) { |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2319 Type* Typer::Visitor::TypeFloat64Atan(Node* node) { return Type::Number(); } | 2325 Type* Typer::Visitor::TypeFloat64Atan(Node* node) { return Type::Number(); } |
2320 | 2326 |
2321 Type* Typer::Visitor::TypeFloat64Atan2(Node* node) { return Type::Number(); } | 2327 Type* Typer::Visitor::TypeFloat64Atan2(Node* node) { return Type::Number(); } |
2322 | 2328 |
2323 Type* Typer::Visitor::TypeFloat64Atanh(Node* node) { return Type::Number(); } | 2329 Type* Typer::Visitor::TypeFloat64Atanh(Node* node) { return Type::Number(); } |
2324 | 2330 |
2325 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } | 2331 Type* Typer::Visitor::TypeFloat64Cbrt(Node* node) { return Type::Number(); } |
2326 | 2332 |
2327 Type* Typer::Visitor::TypeFloat64Cos(Node* node) { return Type::Number(); } | 2333 Type* Typer::Visitor::TypeFloat64Cos(Node* node) { return Type::Number(); } |
2328 | 2334 |
| 2335 Type* Typer::Visitor::TypeFloat64Cosh(Node* node) { return Type::Number(); } |
| 2336 |
2329 Type* Typer::Visitor::TypeFloat64Exp(Node* node) { return Type::Number(); } | 2337 Type* Typer::Visitor::TypeFloat64Exp(Node* node) { return Type::Number(); } |
2330 | 2338 |
2331 Type* Typer::Visitor::TypeFloat64Expm1(Node* node) { return Type::Number(); } | 2339 Type* Typer::Visitor::TypeFloat64Expm1(Node* node) { return Type::Number(); } |
2332 | 2340 |
2333 Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); } | 2341 Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); } |
2334 | 2342 |
2335 Type* Typer::Visitor::TypeFloat64Log1p(Node* node) { return Type::Number(); } | 2343 Type* Typer::Visitor::TypeFloat64Log1p(Node* node) { return Type::Number(); } |
2336 | 2344 |
2337 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } | 2345 Type* Typer::Visitor::TypeFloat64Log10(Node* node) { return Type::Number(); } |
2338 | 2346 |
2339 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } | 2347 Type* Typer::Visitor::TypeFloat64Log2(Node* node) { return Type::Number(); } |
2340 | 2348 |
2341 Type* Typer::Visitor::TypeFloat64Pow(Node* node) { return Type::Number(); } | 2349 Type* Typer::Visitor::TypeFloat64Pow(Node* node) { return Type::Number(); } |
2342 | 2350 |
2343 Type* Typer::Visitor::TypeFloat64Sin(Node* node) { return Type::Number(); } | 2351 Type* Typer::Visitor::TypeFloat64Sin(Node* node) { return Type::Number(); } |
2344 | 2352 |
| 2353 Type* Typer::Visitor::TypeFloat64Sinh(Node* node) { return Type::Number(); } |
| 2354 |
2345 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } | 2355 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } |
2346 | 2356 |
2347 Type* Typer::Visitor::TypeFloat64Tan(Node* node) { return Type::Number(); } | 2357 Type* Typer::Visitor::TypeFloat64Tan(Node* node) { return Type::Number(); } |
2348 | 2358 |
| 2359 Type* Typer::Visitor::TypeFloat64Tanh(Node* node) { return Type::Number(); } |
| 2360 |
2349 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } | 2361 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } |
2350 | 2362 |
2351 | 2363 |
2352 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { | 2364 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { |
2353 return Type::Boolean(); | 2365 return Type::Boolean(); |
2354 } | 2366 } |
2355 | 2367 |
2356 | 2368 |
2357 Type* Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) { | 2369 Type* Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) { |
2358 return Type::Boolean(); | 2370 return Type::Boolean(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 } | 2516 } |
2505 if (Type::IsInteger(*value)) { | 2517 if (Type::IsInteger(*value)) { |
2506 return Type::Range(value->Number(), value->Number(), zone()); | 2518 return Type::Range(value->Number(), value->Number(), zone()); |
2507 } | 2519 } |
2508 return Type::Constant(value, zone()); | 2520 return Type::Constant(value, zone()); |
2509 } | 2521 } |
2510 | 2522 |
2511 } // namespace compiler | 2523 } // namespace compiler |
2512 } // namespace internal | 2524 } // namespace internal |
2513 } // namespace v8 | 2525 } // namespace v8 |
OLD | NEW |