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 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 | 1752 |
1753 Type* Typer::Visitor::TypeNumberShiftRight(Node* node) { | 1753 Type* Typer::Visitor::TypeNumberShiftRight(Node* node) { |
1754 return Type::Signed32(); | 1754 return Type::Signed32(); |
1755 } | 1755 } |
1756 | 1756 |
1757 | 1757 |
1758 Type* Typer::Visitor::TypeNumberShiftRightLogical(Node* node) { | 1758 Type* Typer::Visitor::TypeNumberShiftRightLogical(Node* node) { |
1759 return Type::Unsigned32(); | 1759 return Type::Unsigned32(); |
1760 } | 1760 } |
1761 | 1761 |
| 1762 Type* Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) { |
| 1763 return TypeUnaryOp(node, ToNumber); |
| 1764 } |
| 1765 |
| 1766 Type* Typer::Visitor::TypePlainPrimitiveToWord32(Node* node) { |
| 1767 return Type::Integral32(); |
| 1768 } |
| 1769 |
| 1770 Type* Typer::Visitor::TypePlainPrimitiveToFloat64(Node* node) { |
| 1771 return Type::Number(); |
| 1772 } |
| 1773 |
1762 Type* Typer::Visitor::TypeNumberImul(Node* node) { return Type::Signed32(); } | 1774 Type* Typer::Visitor::TypeNumberImul(Node* node) { return Type::Signed32(); } |
1763 | 1775 |
1764 Type* Typer::Visitor::TypeNumberClz32(Node* node) { | 1776 Type* Typer::Visitor::TypeNumberClz32(Node* node) { |
1765 return typer_->cache_.kZeroToThirtyTwo; | 1777 return typer_->cache_.kZeroToThirtyTwo; |
1766 } | 1778 } |
1767 | 1779 |
1768 Type* Typer::Visitor::TypeNumberCeil(Node* node) { | 1780 Type* Typer::Visitor::TypeNumberCeil(Node* node) { |
1769 return TypeUnaryOp(node, NumberCeil); | 1781 return TypeUnaryOp(node, NumberCeil); |
1770 } | 1782 } |
1771 | 1783 |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2653 } | 2665 } |
2654 if (Type::IsInteger(*value)) { | 2666 if (Type::IsInteger(*value)) { |
2655 return Type::Range(value->Number(), value->Number(), zone()); | 2667 return Type::Range(value->Number(), value->Number(), zone()); |
2656 } | 2668 } |
2657 return Type::Constant(value, zone()); | 2669 return Type::Constant(value, zone()); |
2658 } | 2670 } |
2659 | 2671 |
2660 } // namespace compiler | 2672 } // namespace compiler |
2661 } // namespace internal | 2673 } // namespace internal |
2662 } // namespace v8 | 2674 } // namespace v8 |
OLD | NEW |