mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-07 08:15:34 +00:00
LibJS: Skip ordinary_call_bind_this() when possible
If during parsing it was found that function won't use `this` then there is no need to initialise `this_value` during call.
This commit is contained in:
committed by
Andreas Kling
parent
e934132442
commit
f29ac8517e
@@ -760,6 +760,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, GCPtr<PromiseCa
|
||||
|
||||
FunctionParsingInsights parsing_insights;
|
||||
parsing_insights.uses_this_from_environment = true;
|
||||
parsing_insights.uses_this = true;
|
||||
auto module_wrapper_function = ECMAScriptFunctionObject::create(
|
||||
realm(), "module code with top-level await", StringView {}, this->m_ecmascript_code,
|
||||
{}, 0, {}, environment(), nullptr, FunctionKind::Async, true, parsing_insights);
|
||||
|
||||
Reference in New Issue
Block a user