Commit 569cddb2 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[sparkplug] Rename PrepareForBaseline to InstallBaselineCode

Bug: v8:11429
Change-Id: I626a30d44eca5e2b636d528a9fe0824b8608f4fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712568
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72914}
parent 25a3e855
...@@ -1565,14 +1565,14 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ...@@ -1565,14 +1565,14 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
feedback_vector, FieldMemOperand(feedback_vector, Cell::kValueOffset)); feedback_vector, FieldMemOperand(feedback_vector, Cell::kValueOffset));
Label prepare_for_baseline; Label install_baseline_code;
// Check if feedback vector is valid. If not, call prepare for baseline to // Check if feedback vector is valid. If not, call prepare for baseline to
// allocate it. // allocate it.
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
x7, FieldMemOperand(feedback_vector, HeapObject::kMapOffset)); x7, FieldMemOperand(feedback_vector, HeapObject::kMapOffset));
__ Ldrh(x7, FieldMemOperand(x7, Map::kInstanceTypeOffset)); __ Ldrh(x7, FieldMemOperand(x7, Map::kInstanceTypeOffset));
__ Cmp(x7, FEEDBACK_VECTOR_TYPE); __ Cmp(x7, FEEDBACK_VECTOR_TYPE);
__ B(ne, &prepare_for_baseline); __ B(ne, &install_baseline_code);
// Read off the optimization state in the feedback vector. // Read off the optimization state in the feedback vector.
// TODO(v8:11429): Is this worth doing here? Baseline code will check it // TODO(v8:11429): Is this worth doing here? Baseline code will check it
...@@ -1595,8 +1595,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ...@@ -1595,8 +1595,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ReplaceClosureCodeWithOptimizedCode(masm, x2, closure); ReplaceClosureCodeWithOptimizedCode(masm, x2, closure);
__ JumpCodeObject(x2); __ JumpCodeObject(x2);
__ bind(&prepare_for_baseline); __ bind(&install_baseline_code);
GenerateTailCallToReturnedCode(masm, Runtime::kPrepareForBaseline); GenerateTailCallToReturnedCode(masm, Runtime::kInstallBaselineCode);
} }
__ bind(&compile_lazy); __ bind(&compile_lazy);
......
...@@ -179,7 +179,7 @@ void LazyBuiltinsAssembler::CompileLazy(TNode<JSFunction> function) { ...@@ -179,7 +179,7 @@ void LazyBuiltinsAssembler::CompileLazy(TNode<JSFunction> function) {
code = Select<Code>( code = Select<Code>(
IsFeedbackVector(feedback_cell_value), [=]() { return sfi_code; }, IsFeedbackVector(feedback_cell_value), [=]() { return sfi_code; },
[=]() { [=]() {
return CAST(CallRuntime(Runtime::kPrepareForBaseline, return CAST(CallRuntime(Runtime::kInstallBaselineCode,
Parameter<Context>(Descriptor::kContext), Parameter<Context>(Descriptor::kContext),
function)); function));
}); });
......
...@@ -1287,12 +1287,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ...@@ -1287,12 +1287,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset));
Label prepare_for_baseline; Label install_baseline_code;
// Check if feedback vector is valid. If not, call prepare for baseline to // Check if feedback vector is valid. If not, call prepare for baseline to
// allocate it. // allocate it.
__ LoadMap(rcx, feedback_vector); __ LoadMap(rcx, feedback_vector);
__ CmpInstanceType(rcx, FEEDBACK_VECTOR_TYPE); __ CmpInstanceType(rcx, FEEDBACK_VECTOR_TYPE);
__ j(not_equal, &prepare_for_baseline); __ j(not_equal, &install_baseline_code);
// Read off the optimization state in the feedback vector. // Read off the optimization state in the feedback vector.
// TODO(v8:11429): Is this worth doing here? Baseline code will check it // TODO(v8:11429): Is this worth doing here? Baseline code will check it
...@@ -1319,8 +1319,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ...@@ -1319,8 +1319,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
kInterpreterBytecodeOffsetRegister); kInterpreterBytecodeOffsetRegister);
__ JumpCodeObject(rcx); __ JumpCodeObject(rcx);
__ bind(&prepare_for_baseline); __ bind(&install_baseline_code);
GenerateTailCallToReturnedCode(masm, Runtime::kPrepareForBaseline); GenerateTailCallToReturnedCode(masm, Runtime::kInstallBaselineCode);
} }
__ bind(&stack_overflow); __ bind(&stack_overflow);
......
...@@ -111,8 +111,7 @@ RUNTIME_FUNCTION(Runtime_CompileLazy) { ...@@ -111,8 +111,7 @@ RUNTIME_FUNCTION(Runtime_CompileLazy) {
return function->code(); return function->code();
} }
// TODO(v8:11429): Consider renaming PrepareForBaseline. RUNTIME_FUNCTION(Runtime_InstallBaselineCode) {
RUNTIME_FUNCTION(Runtime_PrepareForBaseline) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(1, args.length()); DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
......
...@@ -108,7 +108,7 @@ namespace internal { ...@@ -108,7 +108,7 @@ namespace internal {
F(CompileBaseline, 1, 1) \ F(CompileBaseline, 1, 1) \
F(CompileOptimized_Concurrent, 1, 1) \ F(CompileOptimized_Concurrent, 1, 1) \
F(CompileOptimized_NotConcurrent, 1, 1) \ F(CompileOptimized_NotConcurrent, 1, 1) \
F(PrepareForBaseline, 1, 1) \ F(InstallBaselineCode, 1, 1) \
F(HealOptimizedCodeSlot, 1, 1) \ F(HealOptimizedCodeSlot, 1, 1) \
F(FunctionFirstExecution, 1, 1) \ F(FunctionFirstExecution, 1, 1) \
F(InstantiateAsmJs, 4, 1) \ F(InstantiateAsmJs, 4, 1) \
......
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