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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1500 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1501 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1501 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1502 } | 1502 } |
1503 | 1503 |
1504 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1504 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1505 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1505 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1506 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1506 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1507 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1507 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1508 } | 1508 } |
1509 | 1509 |
1510 void InstructionSelector::VisitTrapIf(Node* node) { | 1510 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { |
1511 FlagsContinuation cont = FlagsContinuation::ForTrap( | 1511 FlagsContinuation cont = |
1512 kNotEqual, OpParameter<Runtime::FunctionId>(node->op()), | 1512 FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1)); |
1513 node->InputAt(1)); | |
1514 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1513 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1515 } | 1514 } |
1516 | 1515 |
1517 void InstructionSelector::VisitTrapUnless(Node* node) { | 1516 void InstructionSelector::VisitTrapUnless(Node* node, |
1518 FlagsContinuation cont = FlagsContinuation::ForTrap( | 1517 Runtime::FunctionId func_id) { |
1519 kEqual, OpParameter<Runtime::FunctionId>(node->op()), node->InputAt(1)); | 1518 FlagsContinuation cont = |
| 1519 FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1)); |
1520 VisitWordCompareZero(this, node, node->InputAt(0), &cont); | 1520 VisitWordCompareZero(this, node, node->InputAt(0), &cont); |
1521 } | 1521 } |
1522 | 1522 |
1523 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1523 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1524 IA32OperandGenerator g(this); | 1524 IA32OperandGenerator g(this); |
1525 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1525 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1526 | 1526 |
1527 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1527 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1528 size_t table_space_cost = 4 + sw.value_range; | 1528 size_t table_space_cost = 4 + sw.value_range; |
1529 size_t table_time_cost = 3; | 1529 size_t table_time_cost = 3; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1766 // static | 1766 // static |
1767 MachineOperatorBuilder::AlignmentRequirements | 1767 MachineOperatorBuilder::AlignmentRequirements |
1768 InstructionSelector::AlignmentRequirements() { | 1768 InstructionSelector::AlignmentRequirements() { |
1769 return MachineOperatorBuilder::AlignmentRequirements:: | 1769 return MachineOperatorBuilder::AlignmentRequirements:: |
1770 FullUnalignedAccessSupport(); | 1770 FullUnalignedAccessSupport(); |
1771 } | 1771 } |
1772 | 1772 |
1773 } // namespace compiler | 1773 } // namespace compiler |
1774 } // namespace internal | 1774 } // namespace internal |
1775 } // namespace v8 | 1775 } // namespace v8 |
OLD | NEW |