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/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1540 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1541 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1541 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1542 } | 1542 } |
1543 | 1543 |
1544 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1544 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1545 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1545 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1546 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1546 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1547 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1547 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1548 } | 1548 } |
1549 | 1549 |
| 1550 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } |
| 1551 |
| 1552 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } |
| 1553 |
1550 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1554 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1551 X87OperandGenerator g(this); | 1555 X87OperandGenerator g(this); |
1552 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1556 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1553 | 1557 |
1554 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1558 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1555 size_t table_space_cost = 4 + sw.value_range; | 1559 size_t table_space_cost = 4 + sw.value_range; |
1556 size_t table_time_cost = 3; | 1560 size_t table_time_cost = 3; |
1557 size_t lookup_space_cost = 3 + 2 * sw.case_count; | 1561 size_t lookup_space_cost = 3 + 2 * sw.case_count; |
1558 size_t lookup_time_cost = sw.case_count; | 1562 size_t lookup_time_cost = sw.case_count; |
1559 if (sw.case_count > 4 && | 1563 if (sw.case_count > 4 && |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 // static | 1790 // static |
1787 MachineOperatorBuilder::AlignmentRequirements | 1791 MachineOperatorBuilder::AlignmentRequirements |
1788 InstructionSelector::AlignmentRequirements() { | 1792 InstructionSelector::AlignmentRequirements() { |
1789 return MachineOperatorBuilder::AlignmentRequirements:: | 1793 return MachineOperatorBuilder::AlignmentRequirements:: |
1790 FullUnalignedAccessSupport(); | 1794 FullUnalignedAccessSupport(); |
1791 } | 1795 } |
1792 | 1796 |
1793 } // namespace compiler | 1797 } // namespace compiler |
1794 } // namespace internal | 1798 } // namespace internal |
1795 } // namespace v8 | 1799 } // namespace v8 |
OLD | NEW |