JSSpecCompiler: Save references to return value and function arguments

This commit is contained in:
Dan Klishch 2023-10-21 21:18:58 -04:00 committed by Andrew Kaster
parent 7f47340c82
commit 5825eaa264
Notes: sideshowbarker 2024-07-17 07:38:17 +09:00
10 changed files with 89 additions and 49 deletions

View file

@ -140,14 +140,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (step.dump_ast) {
outln(stderr, "===== AST after {} =====", step.step->name());
for (auto const& function : translation_unit.functions_to_compile) {
outln(stderr, "{}():", function->m_name);
outln(stderr, "{}({}):", function->m_name, function->m_argument_names);
outln(stderr, "{}", function->m_ast);
}
}
if (step.dump_cfg && translation_unit.functions_to_compile[0]->m_cfg != nullptr) {
outln(stderr, "===== CFG after {} =====", step.step->name());
for (auto const& function : translation_unit.functions_to_compile) {
outln(stderr, "{}():", function->m_name);
outln(stderr, "{}({}):", function->m_name, function->m_argument_names);
outln(stderr, "{}", *function->m_cfg);
}
}