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 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 } | 1772 } |
1773 | 1773 |
1774 Type* Typer::Visitor::TypeNumberCeil(Node* node) { | 1774 Type* Typer::Visitor::TypeNumberCeil(Node* node) { |
1775 return TypeUnaryOp(node, NumberCeil); | 1775 return TypeUnaryOp(node, NumberCeil); |
1776 } | 1776 } |
1777 | 1777 |
1778 Type* Typer::Visitor::TypeNumberFloor(Node* node) { | 1778 Type* Typer::Visitor::TypeNumberFloor(Node* node) { |
1779 return TypeUnaryOp(node, NumberFloor); | 1779 return TypeUnaryOp(node, NumberFloor); |
1780 } | 1780 } |
1781 | 1781 |
| 1782 Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); } |
| 1783 |
1782 Type* Typer::Visitor::TypeNumberRound(Node* node) { | 1784 Type* Typer::Visitor::TypeNumberRound(Node* node) { |
1783 return TypeUnaryOp(node, NumberRound); | 1785 return TypeUnaryOp(node, NumberRound); |
1784 } | 1786 } |
1785 | 1787 |
1786 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { | 1788 Type* Typer::Visitor::TypeNumberTrunc(Node* node) { |
1787 return TypeUnaryOp(node, NumberTrunc); | 1789 return TypeUnaryOp(node, NumberTrunc); |
1788 } | 1790 } |
1789 | 1791 |
1790 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { | 1792 Type* Typer::Visitor::TypeNumberToInt32(Node* node) { |
1791 return TypeUnaryOp(node, NumberToInt32); | 1793 return TypeUnaryOp(node, NumberToInt32); |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2470 | 2472 |
2471 | 2473 |
2472 Type* Typer::Visitor::TypeFloat64Min(Node* node) { return Type::Number(); } | 2474 Type* Typer::Visitor::TypeFloat64Min(Node* node) { return Type::Number(); } |
2473 | 2475 |
2474 | 2476 |
2475 Type* Typer::Visitor::TypeFloat64Abs(Node* node) { | 2477 Type* Typer::Visitor::TypeFloat64Abs(Node* node) { |
2476 // TODO(turbofan): We should be able to infer a better type here. | 2478 // TODO(turbofan): We should be able to infer a better type here. |
2477 return Type::Number(); | 2479 return Type::Number(); |
2478 } | 2480 } |
2479 | 2481 |
| 2482 Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); } |
2480 | 2483 |
2481 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } | 2484 Type* Typer::Visitor::TypeFloat64Sqrt(Node* node) { return Type::Number(); } |
2482 | 2485 |
2483 | 2486 |
2484 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } | 2487 Type* Typer::Visitor::TypeFloat64Equal(Node* node) { return Type::Boolean(); } |
2485 | 2488 |
2486 | 2489 |
2487 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { | 2490 Type* Typer::Visitor::TypeFloat64LessThan(Node* node) { |
2488 return Type::Boolean(); | 2491 return Type::Boolean(); |
2489 } | 2492 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2639 } | 2642 } |
2640 if (Type::IsInteger(*value)) { | 2643 if (Type::IsInteger(*value)) { |
2641 return Type::Range(value->Number(), value->Number(), zone()); | 2644 return Type::Range(value->Number(), value->Number(), zone()); |
2642 } | 2645 } |
2643 return Type::Constant(value, zone()); | 2646 return Type::Constant(value, zone()); |
2644 } | 2647 } |
2645 | 2648 |
2646 } // namespace compiler | 2649 } // namespace compiler |
2647 } // namespace internal | 2650 } // namespace internal |
2648 } // namespace v8 | 2651 } // namespace v8 |
OLD | NEW |