mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS+LibWeb: Pass function metadata collected in parsing using a struct
By using separate struct we can avoid updating AST node and ECMAScriptFunctionObject constructors every time there is a need to add or remove some additional information colllected during parsing.
This commit is contained in:
parent
99f6528009
commit
e934132442
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: e934132442
Pull-request: https://github.com/SerenityOS/serenity/pull/24414
12 changed files with 75 additions and 73 deletions
|
@ -418,7 +418,7 @@ inline Value new_function(VM& vm, FunctionNode const& function_node, Optional<Id
|
|||
value = function_node.instantiate_ordinary_function_expression(vm, name);
|
||||
} else {
|
||||
value = ECMAScriptFunctionObject::create(*vm.current_realm(), function_node.name(), function_node.source_text(), function_node.body(), function_node.parameters(), function_node.function_length(), function_node.local_variables_names(), vm.lexical_environment(), vm.running_execution_context().private_environment, function_node.kind(), function_node.is_strict_mode(),
|
||||
function_node.uses_this_from_environment(), function_node.might_need_arguments_object(), function_node.contains_direct_call_to_eval(), function_node.is_arrow_function());
|
||||
function_node.parsing_insights(), function_node.is_arrow_function());
|
||||
}
|
||||
|
||||
if (home_object.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue