Commit d2afc25e authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[compiler][cleanup] Fix duplicate definition of callee descriptor

Bug: v8:11879
Change-Id: I7badcbe81485f9e325c75f406560983b78be949a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2989101Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75423}
parent 4504aef7
......@@ -3022,13 +3022,12 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
void InstructionSelector::VisitTailCall(Node* node) {
OperandGenerator g(this);
auto call_descriptor = CallDescriptorOf(node->op());
CallDescriptor* caller = linkage()->GetIncomingDescriptor();
const CallDescriptor* callee = CallDescriptorOf(node->op());
auto caller = linkage()->GetIncomingDescriptor();
auto callee = CallDescriptorOf(node->op());
DCHECK(caller->CanTailCall(callee));
const int stack_param_delta = callee->GetStackParameterDelta(caller);
CallBuffer buffer(zone(), call_descriptor, nullptr);
CallBuffer buffer(zone(), callee, nullptr);
// Compute InstructionOperands for inputs and outputs.
CallBufferFlags flags(kCallCodeImmediate | kCallTail);
......@@ -3044,7 +3043,7 @@ void InstructionSelector::VisitTailCall(Node* node) {
// Select the appropriate opcode based on the call type.
InstructionCode opcode;
InstructionOperandVector temps(zone());
switch (call_descriptor->kind()) {
switch (callee->kind()) {
case CallDescriptor::kCallCodeObject:
opcode = kArchTailCallCodeObject;
break;
......@@ -3061,7 +3060,7 @@ void InstructionSelector::VisitTailCall(Node* node) {
default:
UNREACHABLE();
}
opcode = EncodeCallDescriptorFlags(opcode, call_descriptor->flags());
opcode = EncodeCallDescriptorFlags(opcode, callee->flags());
Emit(kArchPrepareTailCall, g.NoOutput());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment