mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +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:
parent
e934132442
commit
f29ac8517e
Notes:
sideshowbarker
2024-07-16 19:17:47 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: f29ac8517e
Pull-request: https://github.com/SerenityOS/serenity/pull/24414
6 changed files with 25 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue