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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 } | 1548 } |
1549 // Try to use type feedback. | 1549 // Try to use type feedback. |
1550 NumberOperationHint hint = NumberOperationHintOf(node->op()); | 1550 NumberOperationHint hint = NumberOperationHintOf(node->op()); |
1551 switch (hint) { | 1551 switch (hint) { |
1552 case NumberOperationHint::kSignedSmall: | 1552 case NumberOperationHint::kSignedSmall: |
1553 case NumberOperationHint::kSigned32: | 1553 case NumberOperationHint::kSigned32: |
1554 VisitBinop(node, CheckedUseInfoAsWord32FromHint(hint), | 1554 VisitBinop(node, CheckedUseInfoAsWord32FromHint(hint), |
1555 MachineRepresentation::kBit); | 1555 MachineRepresentation::kBit); |
1556 if (lower()) ChangeToPureOp(node, Int32Op(node)); | 1556 if (lower()) ChangeToPureOp(node, Int32Op(node)); |
1557 return; | 1557 return; |
| 1558 case NumberOperationHint::kNumberOrOddball: |
| 1559 // Abstract and strict equality don't perform ToNumber conversions |
| 1560 // on Oddballs, so make sure we don't accidentially sneak in a hint |
| 1561 // with Oddball feedback here. |
| 1562 DCHECK_NE(IrOpcode::kSpeculativeNumberEqual, node->opcode()); |
| 1563 // Fallthrough |
1558 case NumberOperationHint::kNumber: | 1564 case NumberOperationHint::kNumber: |
1559 case NumberOperationHint::kNumberOrOddball: | |
1560 VisitBinop(node, CheckedUseInfoAsFloat64FromHint(hint), | 1565 VisitBinop(node, CheckedUseInfoAsFloat64FromHint(hint), |
1561 MachineRepresentation::kBit); | 1566 MachineRepresentation::kBit); |
1562 if (lower()) ChangeToPureOp(node, Float64Op(node)); | 1567 if (lower()) ChangeToPureOp(node, Float64Op(node)); |
1563 return; | 1568 return; |
1564 } | 1569 } |
1565 UNREACHABLE(); | 1570 UNREACHABLE(); |
1566 return; | 1571 return; |
1567 } | 1572 } |
1568 | 1573 |
1569 case IrOpcode::kNumberAdd: | 1574 case IrOpcode::kNumberAdd: |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3406 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3411 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3407 Operator::kNoProperties); | 3412 Operator::kNoProperties); |
3408 to_number_operator_.set(common()->Call(desc)); | 3413 to_number_operator_.set(common()->Call(desc)); |
3409 } | 3414 } |
3410 return to_number_operator_.get(); | 3415 return to_number_operator_.get(); |
3411 } | 3416 } |
3412 | 3417 |
3413 } // namespace compiler | 3418 } // namespace compiler |
3414 } // namespace internal | 3419 } // namespace internal |
3415 } // namespace v8 | 3420 } // namespace v8 |
OLD | NEW |