LibJS: Clear m_formal_parameters and m_ecmascript_code after compilation

After bytecode compilation, the formal parameters and ecmascript code
AST nodes are no longer needed at runtime. Clear these RefPtrs in
clear_compile_inputs() to allow the AST subtrees to be freed.
This commit is contained in:
Andreas Kling
2026-02-11 01:13:54 +01:00
committed by Andreas Kling
parent 9ea5aa93f8
commit 5e577bec6a
Notes: github-actions[bot] 2026-02-11 23:00:38 +00:00

View File

@@ -301,6 +301,8 @@ SharedFunctionInstanceData::~SharedFunctionInstanceData() = default;
void SharedFunctionInstanceData::clear_compile_inputs()
{
VERIFY(m_executable);
m_formal_parameters = nullptr;
m_ecmascript_code = nullptr;
m_functions_to_initialize.clear();
m_var_names_to_initialize_binding.clear();
m_lexical_bindings.clear();