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/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2539 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 2539 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
2540 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 2540 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
2541 } | 2541 } |
2542 | 2542 |
2543 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 2543 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
2544 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 2544 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
2545 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 2545 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
2546 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 2546 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
2547 } | 2547 } |
2548 | 2548 |
2549 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } | 2549 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { |
| 2550 UNREACHABLE(); |
| 2551 } |
2550 | 2552 |
2551 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } | 2553 void InstructionSelector::VisitTrapUnless(Node* node, |
| 2554 Runtime::FunctionId func_id) { |
| 2555 UNREACHABLE(); |
| 2556 } |
2552 | 2557 |
2553 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 2558 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
2554 Arm64OperandGenerator g(this); | 2559 Arm64OperandGenerator g(this); |
2555 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 2560 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
2556 | 2561 |
2557 // Emit either ArchTableSwitch or ArchLookupSwitch. | 2562 // Emit either ArchTableSwitch or ArchLookupSwitch. |
2558 size_t table_space_cost = 4 + sw.value_range; | 2563 size_t table_space_cost = 4 + sw.value_range; |
2559 size_t table_time_cost = 3; | 2564 size_t table_time_cost = 3; |
2560 size_t lookup_space_cost = 3 + 2 * sw.case_count; | 2565 size_t lookup_space_cost = 3 + 2 * sw.case_count; |
2561 size_t lookup_time_cost = sw.case_count; | 2566 size_t lookup_time_cost = sw.case_count; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2914 // static | 2919 // static |
2915 MachineOperatorBuilder::AlignmentRequirements | 2920 MachineOperatorBuilder::AlignmentRequirements |
2916 InstructionSelector::AlignmentRequirements() { | 2921 InstructionSelector::AlignmentRequirements() { |
2917 return MachineOperatorBuilder::AlignmentRequirements:: | 2922 return MachineOperatorBuilder::AlignmentRequirements:: |
2918 FullUnalignedAccessSupport(); | 2923 FullUnalignedAccessSupport(); |
2919 } | 2924 } |
2920 | 2925 |
2921 } // namespace compiler | 2926 } // namespace compiler |
2922 } // namespace internal | 2927 } // namespace internal |
2923 } // namespace v8 | 2928 } // namespace v8 |
OLD | NEW |