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 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1598 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1599 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1599 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1600 } | 1600 } |
1601 | 1601 |
1602 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1602 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1603 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1603 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1604 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1604 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1605 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1605 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1606 } | 1606 } |
1607 | 1607 |
1608 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } | 1608 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { |
| 1609 UNREACHABLE(); |
| 1610 } |
1609 | 1611 |
1610 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } | 1612 void InstructionSelector::VisitTrapUnless(Node* node, |
| 1613 Runtime::FunctionId func_id) { |
| 1614 UNREACHABLE(); |
| 1615 } |
1611 | 1616 |
1612 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1617 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1613 MipsOperandGenerator g(this); | 1618 MipsOperandGenerator g(this); |
1614 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1619 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1615 | 1620 |
1616 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1621 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1617 size_t table_space_cost = 9 + sw.value_range; | 1622 size_t table_space_cost = 9 + sw.value_range; |
1618 size_t table_time_cost = 3; | 1623 size_t table_time_cost = 3; |
1619 size_t lookup_space_cost = 2 + 2 * sw.case_count; | 1624 size_t lookup_space_cost = 2 + 2 * sw.case_count; |
1620 size_t lookup_time_cost = sw.case_count; | 1625 size_t lookup_time_cost = sw.case_count; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 1888 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || |
1884 IsMipsArchVariant(kMips32r2)); | 1889 IsMipsArchVariant(kMips32r2)); |
1885 return MachineOperatorBuilder::AlignmentRequirements:: | 1890 return MachineOperatorBuilder::AlignmentRequirements:: |
1886 NoUnalignedAccessSupport(); | 1891 NoUnalignedAccessSupport(); |
1887 } | 1892 } |
1888 } | 1893 } |
1889 | 1894 |
1890 } // namespace compiler | 1895 } // namespace compiler |
1891 } // namespace internal | 1896 } // namespace internal |
1892 } // namespace v8 | 1897 } // namespace v8 |
OLD | NEW |