Commit 8ab9821b authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[sparkplug] Remove slow path for VisitCreateFunctionContext

Bytecode generation already emits a manual runtime call for
CreateFunctionContext in the case where the slot count exceeds the
maximum, so we don't need to check for this case in Sparkplug.

Change-Id: I228bc710c5093f7c752dc7bda7912e3af1547371
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755118
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81645}
parent f3cad8ce
......@@ -1881,13 +1881,9 @@ void BaselineCompiler::VisitCreateCatchContext() {
void BaselineCompiler::VisitCreateFunctionContext() {
Handle<ScopeInfo> info = Constant<ScopeInfo>(0);
uint32_t slot_count = Uint(1);
if (slot_count < static_cast<uint32_t>(
ConstructorBuiltins::MaximumFunctionContextSlots())) {
DCHECK_EQ(info->scope_type(), ScopeType::FUNCTION_SCOPE);
CallBuiltin<Builtin::kFastNewFunctionContextFunction>(info, slot_count);
} else {
CallRuntime(Runtime::kNewFunctionContext, Constant<ScopeInfo>(0));
}
DCHECK_LE(slot_count, ConstructorBuiltins::MaximumFunctionContextSlots());
DCHECK_EQ(info->scope_type(), ScopeType::FUNCTION_SCOPE);
CallBuiltin<Builtin::kFastNewFunctionContextFunction>(info, slot_count);
}
void BaselineCompiler::VisitCreateEvalContext() {
......
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