| 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 InstructionOperand op = | 1700 InstructionOperand op = |
| 1701 linkage()->ParameterHasSecondaryLocation(index) | 1701 linkage()->ParameterHasSecondaryLocation(index) |
| 1702 ? g.DefineAsDualLocation( | 1702 ? g.DefineAsDualLocation( |
| 1703 node, linkage()->GetParameterLocation(index), | 1703 node, linkage()->GetParameterLocation(index), |
| 1704 linkage()->GetParameterSecondaryLocation(index)) | 1704 linkage()->GetParameterSecondaryLocation(index)) |
| 1705 : g.DefineAsLocation(node, linkage()->GetParameterLocation(index)); | 1705 : g.DefineAsLocation(node, linkage()->GetParameterLocation(index)); |
| 1706 | 1706 |
| 1707 Emit(kArchNop, op); | 1707 Emit(kArchNop, op); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 namespace { |
| 1711 LinkageLocation ExceptionLocation() { |
| 1712 return LinkageLocation::ForRegister(kReturnRegister0.code(), |
| 1713 MachineType::IntPtr()); |
| 1714 } |
| 1715 } |
| 1710 | 1716 |
| 1711 void InstructionSelector::VisitIfException(Node* node) { | 1717 void InstructionSelector::VisitIfException(Node* node) { |
| 1712 OperandGenerator g(this); | 1718 OperandGenerator g(this); |
| 1713 Node* call = node->InputAt(1); | 1719 DCHECK_EQ(IrOpcode::kCall, node->InputAt(1)->opcode()); |
| 1714 DCHECK_EQ(IrOpcode::kCall, call->opcode()); | 1720 Emit(kArchNop, g.DefineAsLocation(node, ExceptionLocation())); |
| 1715 const CallDescriptor* descriptor = CallDescriptorOf(call->op()); | |
| 1716 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0))); | |
| 1717 } | 1721 } |
| 1718 | 1722 |
| 1719 | 1723 |
| 1720 void InstructionSelector::VisitOsrValue(Node* node) { | 1724 void InstructionSelector::VisitOsrValue(Node* node) { |
| 1721 OperandGenerator g(this); | 1725 OperandGenerator g(this); |
| 1722 int index = OpParameter<int>(node); | 1726 int index = OpParameter<int>(node); |
| 1723 Emit(kArchNop, | 1727 Emit(kArchNop, |
| 1724 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); | 1728 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); |
| 1725 } | 1729 } |
| 1726 | 1730 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 return new (instruction_zone()) FrameStateDescriptor( | 2099 return new (instruction_zone()) FrameStateDescriptor( |
| 2096 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2100 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 2097 state_info.state_combine(), parameters, locals, stack, | 2101 state_info.state_combine(), parameters, locals, stack, |
| 2098 state_info.shared_info(), outer_state); | 2102 state_info.shared_info(), outer_state); |
| 2099 } | 2103 } |
| 2100 | 2104 |
| 2101 | 2105 |
| 2102 } // namespace compiler | 2106 } // namespace compiler |
| 2103 } // namespace internal | 2107 } // namespace internal |
| 2104 } // namespace v8 | 2108 } // namespace v8 |
| OLD | NEW |