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:
Luke Wilde 2025-11-06 17:26:02 +00:00 committed by Andreas Kling
parent 2d15326f5d
commit 354888640d
Notes: github-actions[bot] 2025-11-30 10:56:27 +00:00
5 changed files with 45 additions and 46 deletions

View file

@ -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;