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