1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

JSSpecCompiler: Make function arguments parsing much simpler

In a nutshell, when we understand that the expression is a function
call (this happens at '(' after an expression), stop parsing expression
and start parsing function arguments. This makes
`FunctionCallCanonicalizationPass` and the workaround for zero argument
function calls obsolete.
This commit is contained in:
Dan Klishch 2024-01-21 13:51:05 -05:00 committed by Andrew Kaster
parent 990e30f458
commit d14bb7e91e
10 changed files with 37 additions and 114 deletions

View file

@ -11,7 +11,6 @@
#include "Compiler/Passes/CFGBuildingPass.h"
#include "Compiler/Passes/CFGSimplificationPass.h"
#include "Compiler/Passes/DeadCodeEliminationPass.h"
#include "Compiler/Passes/FunctionCallCanonicalizationPass.h"
#include "Compiler/Passes/IfBranchMergingPass.h"
#include "Compiler/Passes/ReferenceResolvingPass.h"
#include "Compiler/Passes/SSABuildingPass.h"
@ -118,7 +117,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
pipeline.add_step(adopt_own_if_nonnull(new CppParsingStep()));
else
pipeline.add_step(adopt_own_if_nonnull(new SpecParsingStep()));
pipeline.add_compilation_pass<FunctionCallCanonicalizationPass>();
pipeline.add_compilation_pass<IfBranchMergingPass>();
pipeline.add_compilation_pass<ReferenceResolvingPass>();
pipeline.add_compilation_pass<CFGBuildingPass>();