[cleanup] Remove kArchTailCallCodeObjectFromJSFunction

After removing the arguments adaptor frame, there is no more any distinction between
kArchTailCallCodeObjectFromJSFunction and kArchTailCallCodeObject.

Change-Id: Iebb374726b576b8e089425f989bb2da9d5ace4db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639761
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72205}
This commit is contained in:
Victor Gomes 2021-01-20 17:52:45 +01:00 committed by Commit Bot
parent e4bc1efeb9
commit b8744aa27e
13 changed files with 16 additions and 49 deletions

View File

@ -762,7 +762,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (instr->InputAt(0)->IsImmediate()) {
__ Jump(i.InputCode(0), RelocInfo::CODE_TARGET);

View File

@ -696,7 +696,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (instr->InputAt(0)->IsImmediate()) {
__ Jump(i.InputCode(0), RelocInfo::CODE_TARGET);

View File

@ -757,7 +757,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (HasImmediateInput(instr, 0)) {
Handle<Code> code = i.InputCode(0);

View File

@ -67,7 +67,6 @@ inline RecordWriteMode WriteBarrierKindToRecordWriteMode(
/* Tail call opcodes are grouped together to make IsTailCall fast */ \
/* and Arch call opcodes are grouped together to make */ \
/* IsCallWithDescriptorFlags fast */ \
V(ArchTailCallCodeObjectFromJSFunction) \
V(ArchTailCallCodeObject) \
V(ArchTailCallAddress) \
V(ArchTailCallWasm) \

View File

@ -305,7 +305,6 @@ int InstructionScheduler::GetInstructionFlags(const Instruction* instr) const {
case kArchPrepareCallCFunction:
case kArchPrepareTailCall:
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject:
case kArchTailCallAddress:
case kArchTailCallWasm:

View File

@ -3042,28 +3042,20 @@ void InstructionSelector::VisitTailCall(Node* node) {
// Select the appropriate opcode based on the call type.
InstructionCode opcode;
InstructionOperandVector temps(zone());
if (caller->IsJSFunctionCall()) {
switch (call_descriptor->kind()) {
case CallDescriptor::kCallCodeObject:
opcode = kArchTailCallCodeObjectFromJSFunction;
break;
default:
UNREACHABLE();
}
} else {
switch (call_descriptor->kind()) {
case CallDescriptor::kCallCodeObject:
opcode = kArchTailCallCodeObject;
break;
case CallDescriptor::kCallAddress:
opcode = kArchTailCallAddress;
break;
case CallDescriptor::kCallWasmFunction:
opcode = kArchTailCallWasm;
break;
default:
UNREACHABLE();
}
switch (call_descriptor->kind()) {
case CallDescriptor::kCallCodeObject:
opcode = kArchTailCallCodeObject;
break;
case CallDescriptor::kCallAddress:
DCHECK(!caller->IsJSFunctionCall());
opcode = kArchTailCallAddress;
break;
case CallDescriptor::kCallWasmFunction:
DCHECK(!caller->IsJSFunctionCall());
opcode = kArchTailCallWasm;
break;
default:
UNREACHABLE();
}
opcode = EncodeCallDescriptorFlags(opcode, call_descriptor->flags());

View File

@ -670,7 +670,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (instr->InputAt(0)->IsImmediate()) {
__ Jump(i.InputCode(0), RelocInfo::CODE_TARGET);

View File

@ -1384,14 +1384,7 @@ int InstructionScheduler::GetInstructionLatency(const Instruction* instr) {
case kArchCallCodeObject:
case kArchCallWasmFunction:
return CallLatency();
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
int latency = 0;
if (instr->arch_opcode() == kArchTailCallCodeObjectFromJSFunction) {
latency = AssemblePopArgumentsAdaptorFrameLatency();
}
return latency + JumpLatency();
}
case kArchTailCallCodeObject:
case kArchTailCallWasm:
case kArchTailCallAddress:
return JumpLatency();

View File

@ -635,7 +635,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (instr->InputAt(0)->IsImmediate()) {
__ Jump(i.InputCode(0), RelocInfo::CODE_TARGET);

View File

@ -1293,14 +1293,7 @@ int InstructionScheduler::GetInstructionLatency(const Instruction* instr) {
case kArchCallCodeObject:
case kArchCallWasmFunction:
return CallLatency();
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
int latency = 0;
if (instr->arch_opcode() == kArchTailCallCodeObjectFromJSFunction) {
latency = AssemblePopArgumentsAdoptFrameLatency();
}
return latency + JumpLatency();
}
case kArchTailCallCodeObject:
case kArchTailCallWasm:
case kArchTailCallAddress:
return JumpLatency();

View File

@ -891,7 +891,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (HasRegisterInput(instr, 0)) {
Register reg = i.InputRegister(0);

View File

@ -1211,7 +1211,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (HasRegisterInput(instr, 0)) {
Register reg = i.InputRegister(0);

View File

@ -901,8 +901,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
frame_access_state()->ClearSPDelta();
break;
}
// TODO(victorgomes): Remove kArchTailCallCodeObjectFromJSFunction.
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
if (HasImmediateInput(instr, 0)) {
Handle<Code> code = i.InputCode(0);