| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1640 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
| 1641 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1641 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
| 1642 } | 1642 } |
| 1643 | 1643 |
| 1644 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1644 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
| 1645 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1645 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
| 1646 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1646 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
| 1647 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1647 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
| 1648 } | 1648 } |
| 1649 | 1649 |
| 1650 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } |
| 1651 |
| 1652 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } |
| 1653 |
| 1650 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1654 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
| 1651 MipsOperandGenerator g(this); | 1655 MipsOperandGenerator g(this); |
| 1652 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1656 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
| 1653 | 1657 |
| 1654 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1658 // Emit either ArchTableSwitch or ArchLookupSwitch. |
| 1655 size_t table_space_cost = 9 + sw.value_range; | 1659 size_t table_space_cost = 9 + sw.value_range; |
| 1656 size_t table_time_cost = 3; | 1660 size_t table_time_cost = 3; |
| 1657 size_t lookup_space_cost = 2 + 2 * sw.case_count; | 1661 size_t lookup_space_cost = 2 + 2 * sw.case_count; |
| 1658 size_t lookup_time_cost = sw.case_count; | 1662 size_t lookup_time_cost = sw.case_count; |
| 1659 if (sw.case_count > 0 && | 1663 if (sw.case_count > 0 && |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 1925 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || |
| 1922 IsMipsArchVariant(kMips32r2)); | 1926 IsMipsArchVariant(kMips32r2)); |
| 1923 return MachineOperatorBuilder::AlignmentRequirements:: | 1927 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1924 NoUnalignedAccessSupport(); | 1928 NoUnalignedAccessSupport(); |
| 1925 } | 1929 } |
| 1926 } | 1930 } |
| 1927 | 1931 |
| 1928 } // namespace compiler | 1932 } // namespace compiler |
| 1929 } // namespace internal | 1933 } // namespace internal |
| 1930 } // namespace v8 | 1934 } // namespace v8 |
| OLD | NEW |