mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibJS/Bytecode: Make compilation use SharedFunctionInstanceData instead
All the data we need for compilation is in SharedFunctionInstanceData, so we shouldn't depend on ECMAScriptFunctionObject. Allows NativeJavaScriptBackedFunction to compile bytecode.
This commit is contained in:
parent
2d15326f5d
commit
354888640d
Notes:
github-actions[bot]
2025-11-30 10:56:27 +00:00
Author: https://github.com/Lubrsi
Commit: 354888640d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6728
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/awesomekling
5 changed files with 45 additions and 46 deletions
|
|
@ -217,7 +217,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::get_stack_frame_size(size_t& r
|
|||
if (is_module_wrapper()) {
|
||||
executable = TRY(Bytecode::compile(vm(), ecmascript_code(), kind(), name()));
|
||||
} else {
|
||||
executable = TRY(Bytecode::compile(vm(), *this));
|
||||
executable = TRY(Bytecode::compile(vm(), shared_data()));
|
||||
}
|
||||
}
|
||||
registers_and_constants_and_locals_count = executable->registers_and_constants_and_locals_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue