mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 08:22:55 +00:00
JSSpecCompiler: Save references to return value and function arguments
This commit is contained in:
parent
7f47340c82
commit
5825eaa264
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/DanShaders
Commit: 5825eaa264
Pull-request: https://github.com/SerenityOS/serenity/pull/22751
Reviewed-by: https://github.com/ADKaster ✅
10 changed files with 89 additions and 49 deletions
|
@ -30,10 +30,11 @@ FunctionDeclaration::FunctionDeclaration(StringView name)
|
|||
{
|
||||
}
|
||||
|
||||
FunctionDefinition::FunctionDefinition(StringView name, Tree ast)
|
||||
FunctionDefinition::FunctionDefinition(StringView name, Tree ast, Vector<StringView>&& argument_names)
|
||||
: FunctionDeclaration(name)
|
||||
, m_ast(move(ast))
|
||||
, m_return_value(make_ref_counted<NamedVariableDeclaration>("$return"sv))
|
||||
, m_argument_names(move(argument_names))
|
||||
, m_named_return_value(make_ref_counted<NamedVariableDeclaration>("$return"sv))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue