mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
LibJS: Emit bytecode for function declaration instantiation
By doing that all instructions required for instantiation are emitted once in compilation and then reused for subsequent calls, instead of running generic instantiation process for each call.
This commit is contained in:
parent
89a007327a
commit
a4f70986a0
Notes:
sideshowbarker
2024-07-17 10:31:19 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: a4f70986a0
Pull-request: https://github.com/SerenityOS/serenity/pull/24272
15 changed files with 440 additions and 449 deletions
|
@ -711,7 +711,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, GCPtr<PromiseCa
|
|||
// c. Let result be the result of evaluating module.[[ECMAScriptCode]].
|
||||
Completion result;
|
||||
|
||||
auto maybe_executable = Bytecode::compile(vm, m_ecmascript_code, {}, FunctionKind::Normal, "ShadowRealmEval"sv);
|
||||
auto maybe_executable = Bytecode::compile(vm, m_ecmascript_code, FunctionKind::Normal, "ShadowRealmEval"sv);
|
||||
if (maybe_executable.is_error())
|
||||
result = maybe_executable.release_error();
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue