| Index: src/compiler/ia32/instruction-selector-ia32.cc
|
| diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc
|
| index 3bb675ed16978fdb9cc12df6b90a5e464b974188..c19a4e0e41ba90885db18339a7b5ac273eb26db0 100644
|
| --- a/src/compiler/ia32/instruction-selector-ia32.cc
|
| +++ b/src/compiler/ia32/instruction-selector-ia32.cc
|
| @@ -886,84 +886,7 @@ void InstructionSelector::EmitPrepareArguments(NodeVector* arguments,
|
| }
|
|
|
|
|
| -void InstructionSelector::VisitTailCall(Node* node) {
|
| - IA32OperandGenerator g(this);
|
| - CallDescriptor const* descriptor = OpParameter<CallDescriptor const*>(node);
|
| - DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls);
|
| - DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite);
|
| - DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall);
|
| -
|
| - // TODO(turbofan): Relax restriction for stack parameters.
|
| -
|
| - if (linkage()->GetIncomingDescriptor()->CanTailCall(node)) {
|
| - CallBuffer buffer(zone(), descriptor, nullptr);
|
| -
|
| - // Compute InstructionOperands for inputs and outputs.
|
| - InitializeCallBuffer(node, &buffer, true, true);
|
| -
|
| - // Select the appropriate opcode based on the call type.
|
| - InstructionCode opcode;
|
| - switch (descriptor->kind()) {
|
| - case CallDescriptor::kCallCodeObject:
|
| - opcode = kArchTailCallCodeObject;
|
| - break;
|
| - case CallDescriptor::kCallJSFunction:
|
| - opcode = kArchTailCallJSFunction;
|
| - break;
|
| - default:
|
| - UNREACHABLE();
|
| - return;
|
| - }
|
| - opcode |= MiscField::encode(descriptor->flags());
|
| -
|
| - // Emit the tailcall instruction.
|
| - Emit(opcode, 0, nullptr, buffer.instruction_args.size(),
|
| - &buffer.instruction_args.front());
|
| - } else {
|
| - FrameStateDescriptor* frame_state_descriptor =
|
| - descriptor->NeedsFrameState()
|
| - ? GetFrameStateDescriptor(
|
| - node->InputAt(static_cast<int>(descriptor->InputCount())))
|
| - : nullptr;
|
| -
|
| - CallBuffer buffer(zone(), descriptor, frame_state_descriptor);
|
| -
|
| - // Compute InstructionOperands for inputs and outputs.
|
| - InitializeCallBuffer(node, &buffer, true, true);
|
| -
|
| - // Push any stack arguments.
|
| - for (Node* input : base::Reversed(buffer.pushed_nodes)) {
|
| - // TODO(titzer): Handle pushing double parameters.
|
| - InstructionOperand value =
|
| - g.CanBeImmediate(input)
|
| - ? g.UseImmediate(input)
|
| - : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input);
|
| - Emit(kIA32Push, g.NoOutput(), value);
|
| - }
|
| -
|
| - // Select the appropriate opcode based on the call type.
|
| - InstructionCode opcode;
|
| - switch (descriptor->kind()) {
|
| - case CallDescriptor::kCallCodeObject:
|
| - opcode = kArchCallCodeObject;
|
| - break;
|
| - case CallDescriptor::kCallJSFunction:
|
| - opcode = kArchCallJSFunction;
|
| - break;
|
| - default:
|
| - UNREACHABLE();
|
| - return;
|
| - }
|
| - opcode |= MiscField::encode(descriptor->flags());
|
| -
|
| - // Emit the call instruction.
|
| - size_t output_count = buffer.outputs.size();
|
| - auto* outputs = &buffer.outputs.front();
|
| - Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
|
| - &buffer.instruction_args.front())->MarkAsCall();
|
| - Emit(kArchRet, 0, nullptr, output_count, outputs);
|
| - }
|
| -}
|
| +bool InstructionSelector::IsTailCallAddressImmediate() { return true; }
|
|
|
|
|
| namespace {
|
|
|