| 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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); | 1685 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); |
| 1686 } | 1686 } |
| 1687 return; | 1687 return; |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 case IrOpcode::kCheckBounds: { | 1690 case IrOpcode::kCheckBounds: { |
| 1691 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), | 1691 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), |
| 1692 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); | 1692 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); |
| 1693 return; | 1693 return; |
| 1694 } | 1694 } |
| 1695 case IrOpcode::kCheckIf: { |
| 1696 ProcessInput(node, 0, UseInfo::Bool()); |
| 1697 ProcessRemainingInputs(node, 1); |
| 1698 SetOutput(node, MachineRepresentation::kNone); |
| 1699 return; |
| 1700 } |
| 1695 case IrOpcode::kCheckNumber: { | 1701 case IrOpcode::kCheckNumber: { |
| 1696 if (InputIs(node, Type::Number())) { | 1702 if (InputIs(node, Type::Number())) { |
| 1697 if (truncation.TruncatesToWord32()) { | 1703 if (truncation.TruncatesToWord32()) { |
| 1698 VisitUnop(node, UseInfo::TruncatingWord32(), | 1704 VisitUnop(node, UseInfo::TruncatingWord32(), |
| 1699 MachineRepresentation::kWord32); | 1705 MachineRepresentation::kWord32); |
| 1700 } else { | 1706 } else { |
| 1701 VisitUnop(node, UseInfo::TruncatingFloat64(), | 1707 // TODO(jarin,bmeurer): We need to go to Tagged here, because |
| 1702 MachineRepresentation::kFloat64); | 1708 // otherwise we cannot distinguish the hole NaN (which might need to |
| 1709 // be treated as undefined). We should have a dedicated Type for |
| 1710 // that at some point, and maybe even a dedicated truncation. |
| 1711 VisitUnop(node, UseInfo::AnyTagged(), |
| 1712 MachineRepresentation::kTagged); |
| 1703 } | 1713 } |
| 1704 if (lower()) DeferReplacement(node, node->InputAt(0)); | 1714 if (lower()) DeferReplacement(node, node->InputAt(0)); |
| 1705 } else { | 1715 } else { |
| 1706 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); | 1716 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
| 1707 } | 1717 } |
| 1708 return; | 1718 return; |
| 1709 } | 1719 } |
| 1710 case IrOpcode::kCheckTaggedPointer: { | 1720 case IrOpcode::kCheckTaggedPointer: { |
| 1711 if (InputCannotBe(node, Type::SignedSmall())) { | 1721 if (InputCannotBe(node, Type::SignedSmall())) { |
| 1712 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); | 1722 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3097 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3107 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3098 Operator::kNoProperties); | 3108 Operator::kNoProperties); |
| 3099 to_number_operator_.set(common()->Call(desc)); | 3109 to_number_operator_.set(common()->Call(desc)); |
| 3100 } | 3110 } |
| 3101 return to_number_operator_.get(); | 3111 return to_number_operator_.get(); |
| 3102 } | 3112 } |
| 3103 | 3113 |
| 3104 } // namespace compiler | 3114 } // namespace compiler |
| 3105 } // namespace internal | 3115 } // namespace internal |
| 3106 } // namespace v8 | 3116 } // namespace v8 |
| OLD | NEW |