mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
JSSpecCompiler: Refactor CompilerPass
to accept TranslationUnitRef
This commit is contained in:
parent
24682f5dcf
commit
61fa00d46c
8 changed files with 48 additions and 13 deletions
|
@ -56,9 +56,9 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
for (auto const& argument : spec_function.m_arguments)
|
||||
function->m_local_variables.set(argument.name, make_ref_counted<VariableDeclaration>(argument.name));
|
||||
|
||||
FunctionCallCanonicalizationPass(function).run();
|
||||
IfBranchMergingPass(function).run();
|
||||
ReferenceResolvingPass(function).run();
|
||||
FunctionCallCanonicalizationPass(&translation_unit).run();
|
||||
IfBranchMergingPass(&translation_unit).run();
|
||||
ReferenceResolvingPass(&translation_unit).run();
|
||||
|
||||
out("{}", function->m_ast);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue