mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Replace VariableNameToInitialize with value-type VarBinding
Replace VariableNameToInitialize (which holds Identifier const&) with a VarBinding struct that stores pre-extracted values: name, local index, parameter_binding, and function_name. This removes a reference to AST Identifier nodes from SharedFunctionInstanceData, allowing the AST to be freed after compilation.
This commit is contained in:
committed by
Andreas Kling
parent
0e0818a232
commit
7cc392551b
Notes:
github-actions[bot]
2026-02-11 23:01:04 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/7cc392551b7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7896
@@ -70,8 +70,9 @@ public:
|
||||
bool m_has_simple_parameter_list { false };
|
||||
bool m_is_module_wrapper { false };
|
||||
|
||||
struct VariableNameToInitialize {
|
||||
Identifier const& identifier;
|
||||
struct VarBinding {
|
||||
Utf16FlyString name;
|
||||
Identifier::Local local {};
|
||||
bool parameter_binding { false };
|
||||
bool function_name { false };
|
||||
};
|
||||
@@ -87,7 +88,7 @@ public:
|
||||
bool m_arguments_object_needed { false };
|
||||
bool m_function_environment_needed { false };
|
||||
bool m_uses_this { false };
|
||||
Vector<VariableNameToInitialize> m_var_names_to_initialize_binding;
|
||||
Vector<VarBinding> m_var_names_to_initialize_binding;
|
||||
Vector<Utf16FlyString> m_function_names_to_initialize_binding;
|
||||
|
||||
size_t m_function_environment_bindings_count { 0 };
|
||||
|
||||
Reference in New Issue
Block a user