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 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
10 | 10 |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1780 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1781 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); | 1781 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); |
1782 } | 1782 } |
1783 | 1783 |
1784 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1784 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1785 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1785 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1786 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1786 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1787 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); | 1787 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); |
1788 } | 1788 } |
1789 | 1789 |
1790 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } | 1790 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { |
| 1791 UNREACHABLE(); |
| 1792 } |
1791 | 1793 |
1792 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } | 1794 void InstructionSelector::VisitTrapUnless(Node* node, |
| 1795 Runtime::FunctionId func_id) { |
| 1796 UNREACHABLE(); |
| 1797 } |
1793 | 1798 |
1794 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1799 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1795 PPCOperandGenerator g(this); | 1800 PPCOperandGenerator g(this); |
1796 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1801 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1797 | 1802 |
1798 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1803 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1799 size_t table_space_cost = 4 + sw.value_range; | 1804 size_t table_space_cost = 4 + sw.value_range; |
1800 size_t table_time_cost = 3; | 1805 size_t table_time_cost = 3; |
1801 size_t lookup_space_cost = 3 + 2 * sw.case_count; | 1806 size_t lookup_space_cost = 3 + 2 * sw.case_count; |
1802 size_t lookup_time_cost = sw.case_count; | 1807 size_t lookup_time_cost = sw.case_count; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 // static | 2107 // static |
2103 MachineOperatorBuilder::AlignmentRequirements | 2108 MachineOperatorBuilder::AlignmentRequirements |
2104 InstructionSelector::AlignmentRequirements() { | 2109 InstructionSelector::AlignmentRequirements() { |
2105 return MachineOperatorBuilder::AlignmentRequirements:: | 2110 return MachineOperatorBuilder::AlignmentRequirements:: |
2106 FullUnalignedAccessSupport(); | 2111 FullUnalignedAccessSupport(); |
2107 } | 2112 } |
2108 | 2113 |
2109 } // namespace compiler | 2114 } // namespace compiler |
2110 } // namespace internal | 2115 } // namespace internal |
2111 } // namespace v8 | 2116 } // namespace v8 |
OLD | NEW |