Index: src/compiler/arm/instruction-selector-arm.cc |
diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc |
index 585056862725e4f717f2d0b3369bcb8f7c51d97d..3bf7e2f84fd081eb7d365145d04f4938a5dec28a 100644 |
--- a/src/compiler/arm/instruction-selector-arm.cc |
+++ b/src/compiler/arm/instruction-selector-arm.cc |
@@ -785,7 +785,14 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
BasicBlock* deoptimization) { |
ArmOperandGenerator g(this); |
CallDescriptor* descriptor = OpParameter<CallDescriptor*>(call); |
- CallBuffer buffer(zone(), descriptor); // TODO(turbofan): temp zone here? |
+ |
+ FrameStateDescriptor* frame_state_descriptor = NULL; |
+ if (descriptor->NeedsFrameState()) { |
+ frame_state_descriptor = |
+ GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); |
+ } |
+ |
+ CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
// Compute InstructionOperands for inputs and outputs. |
// TODO(turbofan): on ARM64 it's probably better to use the code object in a |
@@ -796,17 +803,16 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
// TODO(dcarney): might be possible to use claim/poke instead |
// Push any stack arguments. |
- for (int i = buffer.pushed_count - 1; i >= 0; --i) { |
- Node* input = buffer.pushed_nodes[i]; |
- Emit(kArmPush, NULL, g.UseRegister(input)); |
+ for (NodeVectorRIter input = buffer.pushed_nodes.rbegin(); |
+ input != buffer.pushed_nodes.rend(); input++) { |
+ Emit(kArmPush, NULL, g.UseRegister(*input)); |
} |
// Select the appropriate opcode based on the call type. |
InstructionCode opcode; |
switch (descriptor->kind()) { |
case CallDescriptor::kCallCodeObject: { |
- bool lazy_deopt = descriptor->CanLazilyDeoptimize(); |
- opcode = kArmCallCodeObject | MiscField::encode(lazy_deopt ? 1 : 0); |
+ opcode = kArmCallCodeObject; |
break; |
} |
case CallDescriptor::kCallAddress: |
@@ -819,11 +825,12 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
UNREACHABLE(); |
return; |
} |
+ opcode |= MiscField::encode(descriptor->deoptimization_support()); |
// Emit the call instruction. |
Instruction* call_instr = |
- Emit(opcode, buffer.output_count, buffer.outputs, |
- buffer.fixed_and_control_count(), buffer.fixed_and_control_args); |
+ Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(), |
+ buffer.instruction_args.size(), &buffer.instruction_args.front()); |
call_instr->MarkAsCall(); |
if (deoptimization != NULL) { |
@@ -833,9 +840,9 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
// Caller clean up of stack for C-style calls. |
if (descriptor->kind() == CallDescriptor::kCallAddress && |
- buffer.pushed_count > 0) { |
+ !buffer.pushed_nodes.empty()) { |
DCHECK(deoptimization == NULL && continuation == NULL); |
- Emit(kArmDrop | MiscField::encode(buffer.pushed_count), NULL); |
+ Emit(kArmDrop | MiscField::encode(buffer.pushed_nodes.size()), NULL); |
} |
} |