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.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 | 1726 |
1727 void InstructionSelector::VisitIfException(Node* node) { | 1727 void InstructionSelector::VisitIfException(Node* node) { |
1728 OperandGenerator g(this); | 1728 OperandGenerator g(this); |
1729 DCHECK_EQ(IrOpcode::kCall, node->InputAt(1)->opcode()); | 1729 DCHECK_EQ(IrOpcode::kCall, node->InputAt(1)->opcode()); |
1730 Emit(kArchNop, g.DefineAsLocation(node, ExceptionLocation())); | 1730 Emit(kArchNop, g.DefineAsLocation(node, ExceptionLocation())); |
1731 } | 1731 } |
1732 | 1732 |
1733 | 1733 |
1734 void InstructionSelector::VisitOsrValue(Node* node) { | 1734 void InstructionSelector::VisitOsrValue(Node* node) { |
1735 OperandGenerator g(this); | 1735 OperandGenerator g(this); |
1736 int index = OpParameter<int>(node); | 1736 int index = OsrValueIndexOf(node->op()); |
1737 Emit(kArchNop, | 1737 Emit(kArchNop, |
1738 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); | 1738 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); |
1739 } | 1739 } |
1740 | 1740 |
1741 | 1741 |
1742 void InstructionSelector::VisitPhi(Node* node) { | 1742 void InstructionSelector::VisitPhi(Node* node) { |
1743 const int input_count = node->op()->ValueInputCount(); | 1743 const int input_count = node->op()->ValueInputCount(); |
1744 PhiInstruction* phi = new (instruction_zone()) | 1744 PhiInstruction* phi = new (instruction_zone()) |
1745 PhiInstruction(instruction_zone(), GetVirtualRegister(node), | 1745 PhiInstruction(instruction_zone(), GetVirtualRegister(node), |
1746 static_cast<size_t>(input_count)); | 1746 static_cast<size_t>(input_count)); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 return new (instruction_zone()) FrameStateDescriptor( | 2113 return new (instruction_zone()) FrameStateDescriptor( |
2114 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2114 instruction_zone(), state_info.type(), state_info.bailout_id(), |
2115 state_info.state_combine(), parameters, locals, stack, | 2115 state_info.state_combine(), parameters, locals, stack, |
2116 state_info.shared_info(), outer_state); | 2116 state_info.shared_info(), outer_state); |
2117 } | 2117 } |
2118 | 2118 |
2119 | 2119 |
2120 } // namespace compiler | 2120 } // namespace compiler |
2121 } // namespace internal | 2121 } // namespace internal |
2122 } // namespace v8 | 2122 } // namespace v8 |
OLD | NEW |