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) { ...@@ -3022,13 +3022,12 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
void InstructionSelector::VisitTailCall(Node* node) { void InstructionSelector::VisitTailCall(Node* node) {
OperandGenerator g(this); OperandGenerator g(this);
auto call_descriptor = CallDescriptorOf(node->op());
CallDescriptor* caller = linkage()->GetIncomingDescriptor(); auto caller = linkage()->GetIncomingDescriptor();
const CallDescriptor* callee = CallDescriptorOf(node->op()); auto callee = CallDescriptorOf(node->op());
DCHECK(caller->CanTailCall(callee)); DCHECK(caller->CanTailCall(callee));
const int stack_param_delta = callee->GetStackParameterDelta(caller); 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. // Compute InstructionOperands for inputs and outputs.
CallBufferFlags flags(kCallCodeImmediate | kCallTail); CallBufferFlags flags(kCallCodeImmediate | kCallTail);
...@@ -3044,7 +3043,7 @@ void InstructionSelector::VisitTailCall(Node* node) { ...@@ -3044,7 +3043,7 @@ void InstructionSelector::VisitTailCall(Node* node) {
// Select the appropriate opcode based on the call type. // Select the appropriate opcode based on the call type.
InstructionCode opcode; InstructionCode opcode;
InstructionOperandVector temps(zone()); InstructionOperandVector temps(zone());
switch (call_descriptor->kind()) { switch (callee->kind()) {
case CallDescriptor::kCallCodeObject: case CallDescriptor::kCallCodeObject:
opcode = kArchTailCallCodeObject; opcode = kArchTailCallCodeObject;
break; break;
...@@ -3061,7 +3060,7 @@ void InstructionSelector::VisitTailCall(Node* node) { ...@@ -3061,7 +3060,7 @@ void InstructionSelector::VisitTailCall(Node* node) {
default: default:
UNREACHABLE(); UNREACHABLE();
} }
opcode = EncodeCallDescriptorFlags(opcode, call_descriptor->flags()); opcode = EncodeCallDescriptorFlags(opcode, callee->flags());
Emit(kArchPrepareTailCall, g.NoOutput()); 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