| 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/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 if (lower()) node->set_op(Float64Op(node)); | 625 if (lower()) node->set_op(Float64Op(node)); |
| 626 break; | 626 break; |
| 627 } | 627 } |
| 628 case IrOpcode::kNumberDivide: { | 628 case IrOpcode::kNumberDivide: { |
| 629 if (CanLowerToInt32Binop(node, use)) { | 629 if (CanLowerToInt32Binop(node, use)) { |
| 630 // => signed Int32Div | 630 // => signed Int32Div |
| 631 VisitInt32Binop(node); | 631 VisitInt32Binop(node); |
| 632 if (lower()) DeferReplacement(node, lowering->Int32Div(node)); | 632 if (lower()) DeferReplacement(node, lowering->Int32Div(node)); |
| 633 break; | 633 break; |
| 634 } | 634 } |
| 635 if (CanLowerToUint32Binop(node, use)) { | 635 if (BothInputsAre(node, Type::Unsigned32()) && !CanObserveNaN(use)) { |
| 636 // => unsigned Uint32Div | 636 // => unsigned Uint32Div |
| 637 VisitUint32Binop(node); | 637 VisitUint32Binop(node); |
| 638 if (lower()) DeferReplacement(node, lowering->Uint32Div(node)); | 638 if (lower()) DeferReplacement(node, lowering->Uint32Div(node)); |
| 639 break; | 639 break; |
| 640 } | 640 } |
| 641 // => Float64Div | 641 // => Float64Div |
| 642 VisitFloat64Binop(node); | 642 VisitFloat64Binop(node); |
| 643 if (lower()) node->set_op(Float64Op(node)); | 643 if (lower()) node->set_op(Float64Op(node)); |
| 644 break; | 644 break; |
| 645 } | 645 } |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 | 1469 |
| 1470 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1470 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
| 1471 node->set_op(machine()->IntLessThanOrEqual()); | 1471 node->set_op(machine()->IntLessThanOrEqual()); |
| 1472 node->ReplaceInput(0, StringComparison(node, true)); | 1472 node->ReplaceInput(0, StringComparison(node, true)); |
| 1473 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1473 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 } // namespace compiler | 1476 } // namespace compiler |
| 1477 } // namespace internal | 1477 } // namespace internal |
| 1478 } // namespace v8 | 1478 } // namespace v8 |
| OLD | NEW |