| 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..3b2dbf53ed9a8b7df62f3660a7630555da8d0cf3 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,7 +803,7 @@ 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) {
|
| + for (int i = buffer.pushed_nodes.size() - 1; i >= 0; --i) {
|
| Node* input = buffer.pushed_nodes[i];
|
| Emit(kArmPush, NULL, g.UseRegister(input));
|
| }
|
| @@ -805,8 +812,7 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
|
| 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);
|
| }
|
| }
|
|
|
|
|