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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1583 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1584 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1584 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1585 } | 1585 } |
1586 | 1586 |
1587 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1587 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1588 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1588 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1589 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1589 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1590 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1590 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1591 } | 1591 } |
1592 | 1592 |
1593 void InstructionSelector::VisitTrapIf(Node* node) { | 1593 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { |
1594 FlagsContinuation cont = FlagsContinuation::ForTrap( | 1594 FlagsContinuation cont = |
1595 kNotEqual, OpParameter<Runtime::FunctionId>(node->op()), | 1595 FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1)); |
1596 node->InputAt(1)); | |
1597 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1596 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1598 } | 1597 } |
1599 | 1598 |
1600 void InstructionSelector::VisitTrapUnless(Node* node) { | 1599 void InstructionSelector::VisitTrapUnless(Node* node, |
1601 FlagsContinuation cont = FlagsContinuation::ForTrap( | 1600 Runtime::FunctionId func_id) { |
1602 kEqual, OpParameter<Runtime::FunctionId>(node->op()), node->InputAt(1)); | 1601 FlagsContinuation cont = |
| 1602 FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1)); |
1603 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1603 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1604 } | 1604 } |
1605 | 1605 |
1606 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1606 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1607 X87OperandGenerator g(this); | 1607 X87OperandGenerator g(this); |
1608 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1608 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1609 | 1609 |
1610 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1610 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1611 size_t table_space_cost = 4 + sw.value_range; | 1611 size_t table_space_cost = 4 + sw.value_range; |
1612 size_t table_time_cost = 3; | 1612 size_t table_time_cost = 3; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 // static | 1842 // static |
1843 MachineOperatorBuilder::AlignmentRequirements | 1843 MachineOperatorBuilder::AlignmentRequirements |
1844 InstructionSelector::AlignmentRequirements() { | 1844 InstructionSelector::AlignmentRequirements() { |
1845 return MachineOperatorBuilder::AlignmentRequirements:: | 1845 return MachineOperatorBuilder::AlignmentRequirements:: |
1846 FullUnalignedAccessSupport(); | 1846 FullUnalignedAccessSupport(); |
1847 } | 1847 } |
1848 | 1848 |
1849 } // namespace compiler | 1849 } // namespace compiler |
1850 } // namespace internal | 1850 } // namespace internal |
1851 } // namespace v8 | 1851 } // namespace v8 |
OLD | NEW |