[interpreter][cleanup] Rename interpreter entry trampolines

Rename
 - InterpreterEnterBytecodeDispatch to InterpreterEnterAtBytecode
 - InterpreterEnterBytecodeAdvance to InterpreterEnterAtNextBytecode.

The reason for renaming is consistency with baseline trampolines that
have similar functionality, but the old names didn't fit for baseline
very well.

Change-Id: I35897972fdd71f3bb0db74820db2b9034144a3c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830794
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74027}
This commit is contained in:
Patrick Thier 2021-04-16 08:11:21 +00:00 committed by Commit Bot
parent 2eefd6a114
commit d90be52e98
16 changed files with 33 additions and 33 deletions

View File

@ -1647,7 +1647,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ ldr(kInterpreterBytecodeArrayRegister,
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1692,7 +1692,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1861,7 +1861,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Br(x17);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ ldr(kInterpreterBytecodeArrayRegister,
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1905,7 +1905,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}
@ -3255,7 +3255,7 @@ void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
// Compute the handler entry address and jump to it. We use x17 here for the
// jump target, as this jump can occasionally end up at the start of
// InterpreterEnterBytecodeDispatch, which when CFI is enabled starts with
// InterpreterEnterAtBytecode, which when CFI is enabled starts with
// a "BTI c".
UseScratchRegisterScope temps(masm);
temps.Exclude(x17);

View File

@ -133,8 +133,8 @@ namespace internal {
InterpreterPushArgsThenConstruct) \
ASM(InterpreterPushArgsThenConstructWithFinalSpread, \
InterpreterPushArgsThenConstruct) \
ASM(InterpreterEnterBytecodeAdvance, Dummy) \
ASM(InterpreterEnterBytecodeDispatch, Dummy) \
ASM(InterpreterEnterAtBytecode, Dummy) \
ASM(InterpreterEnterAtNextBytecode, Dummy) \
ASM(InterpreterOnStackReplacement, ContextOnly) \
\
/* Baseline Compiler */ \

View File

@ -1592,7 +1592,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ jmp(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ mov(kInterpreterBytecodeArrayRegister,
Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1637,7 +1637,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}
// static

View File

@ -1406,7 +1406,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Advance the current bytecode offset stored within the given interpreter
// stack frame. This simulates what all bytecode handlers do upon completion
// of the underlying operation.
@ -1453,7 +1453,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1424,7 +1424,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Advance the current bytecode offset stored within the given interpreter
// stack frame. This simulates what all bytecode handlers do upon completion
// of the underlying operation.
@ -1471,7 +1471,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1478,7 +1478,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ LoadP(kInterpreterBytecodeArrayRegister,
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1524,7 +1524,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1630,7 +1630,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Advance the current bytecode offset stored within the given interpreter
// stack frame. This simulates what all bytecode handlers do upon completion
// of the underlying operation.
@ -1677,7 +1677,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1527,7 +1527,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Jump(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ LoadU64(kInterpreterBytecodeArrayRegister,
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1573,7 +1573,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1568,7 +1568,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ jmp(kJavaScriptCallCodeStartRegister);
}
void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
// Get bytecode array and bytecode offset from the stack frame.
__ movq(kInterpreterBytecodeArrayRegister,
Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp));
@ -1613,7 +1613,7 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
__ Abort(AbortReason::kInvalidBytecodeAdvance);
}
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterAtBytecode(MacroAssembler* masm) {
Generate_InterpreterEnterBytecode(masm);
}

View File

@ -1244,7 +1244,7 @@ class DiscardBaselineCodeVisitor : public ThreadVisitor {
if (!deopt_all && frame->function().shared() != shared_) continue;
int bytecode_offset = frame->GetBytecodeOffset();
Address* pc_addr = frame->pc_address();
Address advance = BUILTIN_CODE(isolate, InterpreterEnterBytecodeAdvance)
Address advance = BUILTIN_CODE(isolate, InterpreterEnterAtNextBytecode)
->InstructionStart();
PointerAuthentication::ReplacePC(pc_addr, advance, kSystemPointerSize);
InterpretedFrame::cast(it.Reframe())

View File

@ -6,8 +6,8 @@
#include "src/deoptimizer/deoptimizer.h"
extern "C" {
void Builtins_InterpreterEnterBytecodeAdvance();
void Builtins_InterpreterEnterBytecodeDispatch();
void Builtins_InterpreterEnterAtBytecode();
void Builtins_InterpreterEnterAtNextBytecode();
void Builtins_ContinueToCodeStubBuiltinWithResult();
void Builtins_ContinueToCodeStubBuiltin();
void Builtins_ContinueToJavaScriptBuiltinWithResult();
@ -24,8 +24,8 @@ namespace internal {
// List of allowed builtin addresses that we can return to in the deoptimizer.
constexpr function_ptr builtins[] = {
&Builtins_InterpreterEnterBytecodeAdvance,
&Builtins_InterpreterEnterBytecodeDispatch,
&Builtins_InterpreterEnterAtBytecode,
&Builtins_InterpreterEnterAtNextBytecode,
&Builtins_ContinueToCodeStubBuiltinWithResult,
&Builtins_ContinueToCodeStubBuiltin,
&Builtins_ContinueToJavaScriptBuiltinWithResult,

View File

@ -996,8 +996,8 @@ Builtins::Name DispatchBuiltinFor(bool is_baseline, bool advance_bc) {
return advance_bc ? Builtins::kBaselineEnterAtNextBytecode
: Builtins::kBaselineEnterAtBytecode;
} else {
return advance_bc ? Builtins::kInterpreterEnterBytecodeAdvance
: Builtins::kInterpreterEnterBytecodeDispatch;
return advance_bc ? Builtins::kInterpreterEnterAtNextBytecode
: Builtins::kInterpreterEnterAtBytecode;
}
}

View File

@ -228,8 +228,8 @@ bool IsInterpreterFramePc(Isolate* isolate, Address pc,
Builtins::Name builtin_index = InstructionStream::TryLookupCode(isolate, pc);
if (builtin_index != Builtins::kNoBuiltinId &&
(builtin_index == Builtins::kInterpreterEntryTrampoline ||
builtin_index == Builtins::kInterpreterEnterBytecodeAdvance ||
builtin_index == Builtins::kInterpreterEnterBytecodeDispatch ||
builtin_index == Builtins::kInterpreterEnterAtBytecode ||
builtin_index == Builtins::kInterpreterEnterAtNextBytecode ||
builtin_index == Builtins::kBaselineEnterAtBytecode ||
builtin_index == Builtins::kBaselineEnterAtNextBytecode)) {
return true;

View File

@ -1910,7 +1910,7 @@ Object Isolate::UnwindAndFindHandler() {
static_cast<int>(offset));
Code code =
builtins()->builtin(Builtins::kInterpreterEnterBytecodeDispatch);
builtins()->builtin(Builtins::kInterpreterEnterAtBytecode);
return FoundHandler(context, code.InstructionStart(), 0,
code.constant_pool(), return_sp, frame->fp());
}

View File

@ -450,8 +450,8 @@ inline bool Code::is_interpreter_trampoline_builtin() const {
const int index = builtin_index();
return index != Builtins::kNoBuiltinId &&
(index == Builtins::kInterpreterEntryTrampoline ||
index == Builtins::kInterpreterEnterBytecodeAdvance ||
index == Builtins::kInterpreterEnterBytecodeDispatch);
index == Builtins::kInterpreterEnterAtBytecode ||
index == Builtins::kInterpreterEnterAtNextBytecode);
}
inline bool Code::is_baseline_trampoline_builtin() const {