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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 #include "src/compiler/graph-inl.h" | 6 #include "src/compiler/graph-inl.h" |
7 #include "src/compiler/graph-reducer.h" | 7 #include "src/compiler/graph-reducer.h" |
8 #include "src/compiler/js-operator.h" | 8 #include "src/compiler/js-operator.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 return TypeUnaryOp(node, ToBoolean); | 1455 return TypeUnaryOp(node, ToBoolean); |
1456 } | 1456 } |
1457 | 1457 |
1458 | 1458 |
1459 Bounds Typer::Visitor::TypeBooleanNot(Node* node) { | 1459 Bounds Typer::Visitor::TypeBooleanNot(Node* node) { |
1460 return Bounds(Type::None(zone()), Type::Boolean(zone())); | 1460 return Bounds(Type::None(zone()), Type::Boolean(zone())); |
1461 } | 1461 } |
1462 | 1462 |
1463 | 1463 |
1464 Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) { | 1464 Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) { |
1465 return Bounds(Type::None(zone()), typer_->zero_or_one); | 1465 return TypeUnaryOp(node, ToNumber); |
1466 } | 1466 } |
1467 | 1467 |
1468 | 1468 |
1469 Bounds Typer::Visitor::TypeNumberEqual(Node* node) { | 1469 Bounds Typer::Visitor::TypeNumberEqual(Node* node) { |
1470 return Bounds(Type::None(zone()), Type::Boolean(zone())); | 1470 return Bounds(Type::None(zone()), Type::Boolean(zone())); |
1471 } | 1471 } |
1472 | 1472 |
1473 | 1473 |
1474 Bounds Typer::Visitor::TypeNumberLessThan(Node* node) { | 1474 Bounds Typer::Visitor::TypeNumberLessThan(Node* node) { |
1475 return Bounds(Type::None(zone()), Type::Boolean(zone())); | 1475 return Bounds(Type::None(zone()), Type::Boolean(zone())); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 Bounds Typer::Visitor::TypeNumberToInt32(Node* node) { | 1509 Bounds Typer::Visitor::TypeNumberToInt32(Node* node) { |
1510 return TypeUnaryOp(node, NumberToInt32); | 1510 return TypeUnaryOp(node, NumberToInt32); |
1511 } | 1511 } |
1512 | 1512 |
1513 | 1513 |
1514 Bounds Typer::Visitor::TypeNumberToUint32(Node* node) { | 1514 Bounds Typer::Visitor::TypeNumberToUint32(Node* node) { |
1515 return TypeUnaryOp(node, NumberToUint32); | 1515 return TypeUnaryOp(node, NumberToUint32); |
1516 } | 1516 } |
1517 | 1517 |
1518 | 1518 |
| 1519 Bounds Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) { |
| 1520 return TypeUnaryOp(node, ToNumber); |
| 1521 } |
| 1522 |
| 1523 |
1519 Bounds Typer::Visitor::TypeReferenceEqual(Node* node) { | 1524 Bounds Typer::Visitor::TypeReferenceEqual(Node* node) { |
1520 return Bounds(Type::None(zone()), Type::Boolean(zone())); | 1525 return Bounds(Type::None(zone()), Type::Boolean(zone())); |
1521 } | 1526 } |
1522 | 1527 |
1523 | 1528 |
1524 Bounds Typer::Visitor::TypeStringEqual(Node* node) { | 1529 Bounds Typer::Visitor::TypeStringEqual(Node* node) { |
1525 return Bounds(Type::None(zone()), Type::Boolean(zone())); | 1530 return Bounds(Type::None(zone()), Type::Boolean(zone())); |
1526 } | 1531 } |
1527 | 1532 |
1528 | 1533 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 2126 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
2122 #undef TYPED_ARRAY_CASE | 2127 #undef TYPED_ARRAY_CASE |
2123 } | 2128 } |
2124 } | 2129 } |
2125 return Type::Constant(value, zone()); | 2130 return Type::Constant(value, zone()); |
2126 } | 2131 } |
2127 | 2132 |
2128 } // namespace compiler | 2133 } // namespace compiler |
2129 } // namespace internal | 2134 } // namespace internal |
2130 } // namespace v8 | 2135 } // namespace v8 |
OLD | NEW |