mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
JSSpecCompiler: Make TranslationUnit fields private
For some reason I was afraid to add trivial accessors to classes in earlier PRs, so we now have dozens of classes with public fields. I'm not exactly looking forward to refactoring them all at once but I'll do so gradually.
This commit is contained in:
committed by
Andrew Kaster
parent
a2f7849238
commit
3aec6952a2
@@ -120,8 +120,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
step.dump_cfg = true;
|
||||
});
|
||||
|
||||
TranslationUnit translation_unit;
|
||||
translation_unit.filename = filename;
|
||||
TranslationUnit translation_unit(filename);
|
||||
|
||||
// Functions referenced in DifferenceISODate
|
||||
// TODO: This is here just for testing. In a long run, we need some place, which is not
|
||||
@@ -139,14 +138,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) {
|
||||
for (auto const& function : translation_unit.functions_to_compile()) {
|
||||
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) {
|
||||
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) {
|
||||
for (auto const& function : translation_unit.functions_to_compile()) {
|
||||
outln(stderr, "{}({}):", function->m_name, function->m_argument_names);
|
||||
outln(stderr, "{}", *function->m_cfg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user