| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 // Dispatching routine for visiting the node {node} with the usage {use}. | 491 // Dispatching routine for visiting the node {node} with the usage {use}. |
| 492 // Depending on the operator, propagate new usage info to the inputs. | 492 // Depending on the operator, propagate new usage info to the inputs. |
| 493 void VisitNode(Node* node, MachineTypeUnion use, | 493 void VisitNode(Node* node, MachineTypeUnion use, |
| 494 SimplifiedLowering* lowering) { | 494 SimplifiedLowering* lowering) { |
| 495 switch (node->opcode()) { | 495 switch (node->opcode()) { |
| 496 //------------------------------------------------------------------ | 496 //------------------------------------------------------------------ |
| 497 // Common operators. | 497 // Common operators. |
| 498 //------------------------------------------------------------------ | 498 //------------------------------------------------------------------ |
| 499 case IrOpcode::kStart: | 499 case IrOpcode::kStart: |
| 500 case IrOpcode::kDeadControl: | 500 case IrOpcode::kDead: |
| 501 return VisitLeaf(node, 0); | 501 return VisitLeaf(node, 0); |
| 502 case IrOpcode::kParameter: { | 502 case IrOpcode::kParameter: { |
| 503 // TODO(titzer): use representation from linkage. | 503 // TODO(titzer): use representation from linkage. |
| 504 Type* upper = NodeProperties::GetBounds(node).upper; | 504 Type* upper = NodeProperties::GetBounds(node).upper; |
| 505 ProcessInput(node, 0, 0); | 505 ProcessInput(node, 0, 0); |
| 506 SetOutput(node, kRepTagged | changer_->TypeFromUpperBound(upper)); | 506 SetOutput(node, kRepTagged | changer_->TypeFromUpperBound(upper)); |
| 507 return; | 507 return; |
| 508 } | 508 } |
| 509 case IrOpcode::kInt32Constant: | 509 case IrOpcode::kInt32Constant: |
| 510 return VisitLeaf(node, kRepWord32); | 510 return VisitLeaf(node, kRepWord32); |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 | 1592 |
| 1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
| 1594 node->set_op(machine()->IntLessThanOrEqual()); | 1594 node->set_op(machine()->IntLessThanOrEqual()); |
| 1595 node->ReplaceInput(0, StringComparison(node, true)); | 1595 node->ReplaceInput(0, StringComparison(node, true)); |
| 1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 } // namespace compiler | 1599 } // namespace compiler |
| 1600 } // namespace internal | 1600 } // namespace internal |
| 1601 } // namespace v8 | 1601 } // namespace v8 |
| OLD | NEW |