| 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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 void InstructionSelector::VisitGuard(Node* node) { | 1082 void InstructionSelector::VisitGuard(Node* node) { |
| 1083 OperandGenerator g(this); | 1083 OperandGenerator g(this); |
| 1084 Node* value = node->InputAt(0); | 1084 Node* value = node->InputAt(0); |
| 1085 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1085 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 | 1088 |
| 1089 void InstructionSelector::VisitParameter(Node* node) { | 1089 void InstructionSelector::VisitParameter(Node* node) { |
| 1090 OperandGenerator g(this); | 1090 OperandGenerator g(this); |
| 1091 int index = ParameterIndexOf(node->op()); | 1091 int index = ParameterIndexOf(node->op()); |
| 1092 Emit(kArchNop, | 1092 InstructionOperand op = |
| 1093 g.DefineAsLocation(node, linkage()->GetParameterLocation(index), | 1093 linkage()->ParameterHasSecondaryLocation(index) |
| 1094 linkage()->GetParameterType(index))); | 1094 ? g.DefineAsDualLocation( |
| 1095 node, linkage()->GetParameterLocation(index), |
| 1096 linkage()->GetParameterSecondaryLocation(index)) |
| 1097 : g.DefineAsLocation(node, linkage()->GetParameterLocation(index), |
| 1098 linkage()->GetParameterType(index)); |
| 1099 |
| 1100 Emit(kArchNop, op); |
| 1095 } | 1101 } |
| 1096 | 1102 |
| 1097 | 1103 |
| 1098 void InstructionSelector::VisitIfException(Node* node) { | 1104 void InstructionSelector::VisitIfException(Node* node) { |
| 1099 OperandGenerator g(this); | 1105 OperandGenerator g(this); |
| 1100 Node* call = node->InputAt(1); | 1106 Node* call = node->InputAt(1); |
| 1101 DCHECK_EQ(IrOpcode::kCall, call->opcode()); | 1107 DCHECK_EQ(IrOpcode::kCall, call->opcode()); |
| 1102 const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call); | 1108 const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call); |
| 1103 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0), | 1109 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0), |
| 1104 descriptor->GetReturnType(0))); | 1110 descriptor->GetReturnType(0))); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 return new (instruction_zone()) FrameStateDescriptor( | 1373 return new (instruction_zone()) FrameStateDescriptor( |
| 1368 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1374 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1369 state_info.state_combine(), parameters, locals, stack, | 1375 state_info.state_combine(), parameters, locals, stack, |
| 1370 state_info.shared_info(), outer_state); | 1376 state_info.shared_info(), outer_state); |
| 1371 } | 1377 } |
| 1372 | 1378 |
| 1373 | 1379 |
| 1374 } // namespace compiler | 1380 } // namespace compiler |
| 1375 } // namespace internal | 1381 } // namespace internal |
| 1376 } // namespace v8 | 1382 } // namespace v8 |
| OLD | NEW |