Chromium Code Reviews| 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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1689 InstructionOperand op = | 1689 InstructionOperand op = | 
| 1690 linkage()->ParameterHasSecondaryLocation(index) | 1690 linkage()->ParameterHasSecondaryLocation(index) | 
| 1691 ? g.DefineAsDualLocation( | 1691 ? g.DefineAsDualLocation( | 
| 1692 node, linkage()->GetParameterLocation(index), | 1692 node, linkage()->GetParameterLocation(index), | 
| 1693 linkage()->GetParameterSecondaryLocation(index)) | 1693 linkage()->GetParameterSecondaryLocation(index)) | 
| 1694 : g.DefineAsLocation(node, linkage()->GetParameterLocation(index)); | 1694 : g.DefineAsLocation(node, linkage()->GetParameterLocation(index)); | 
| 1695 | 1695 | 
| 1696 Emit(kArchNop, op); | 1696 Emit(kArchNop, op); | 
| 1697 } | 1697 } | 
| 1698 | 1698 | 
| 1699 namespace { | |
| 1700 LinkageLocation ExceptionLocation() { | |
| 
 
bradnelson
2016/09/27 04:25:56
Could land this as a separate fix if you link (rol
 
John
2016/09/28 13:37:18
Small enough, and mildly related to this CL... I'l
 
 | |
| 1701 return LinkageLocation::ForRegister(kReturnRegister0.code(), | |
| 1702 MachineType::IntPtr()); | |
| 1703 } | |
| 1704 } | |
| 1699 | 1705 | 
| 1700 void InstructionSelector::VisitIfException(Node* node) { | 1706 void InstructionSelector::VisitIfException(Node* node) { | 
| 1701 OperandGenerator g(this); | 1707 OperandGenerator g(this); | 
| 1702 Node* call = node->InputAt(1); | 1708 DCHECK_EQ(IrOpcode::kCall, node->InputAt(1)->opcode()); | 
| 1703 DCHECK_EQ(IrOpcode::kCall, call->opcode()); | 1709 Emit(kArchNop, g.DefineAsLocation(node, ExceptionLocation())); | 
| 1704 const CallDescriptor* descriptor = CallDescriptorOf(call->op()); | |
| 1705 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0))); | |
| 1706 } | 1710 } | 
| 1707 | 1711 | 
| 1708 | 1712 | 
| 1709 void InstructionSelector::VisitOsrValue(Node* node) { | 1713 void InstructionSelector::VisitOsrValue(Node* node) { | 
| 1710 OperandGenerator g(this); | 1714 OperandGenerator g(this); | 
| 1711 int index = OpParameter<int>(node); | 1715 int index = OpParameter<int>(node); | 
| 1712 Emit(kArchNop, | 1716 Emit(kArchNop, | 
| 1713 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); | 1717 g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index))); | 
| 1714 } | 1718 } | 
| 1715 | 1719 | 
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2084 return new (instruction_zone()) FrameStateDescriptor( | 2088 return new (instruction_zone()) FrameStateDescriptor( | 
| 2085 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2089 instruction_zone(), state_info.type(), state_info.bailout_id(), | 
| 2086 state_info.state_combine(), parameters, locals, stack, | 2090 state_info.state_combine(), parameters, locals, stack, | 
| 2087 state_info.shared_info(), outer_state); | 2091 state_info.shared_info(), outer_state); | 
| 2088 } | 2092 } | 
| 2089 | 2093 | 
| 2090 | 2094 | 
| 2091 } // namespace compiler | 2095 } // namespace compiler | 
| 2092 } // namespace internal | 2096 } // namespace internal | 
| 2093 } // namespace v8 | 2097 } // namespace v8 | 
| OLD | NEW |