13 for (
auto mut :
world().copy_externals()) mut->transfer_external(
rewrite(mut)->as_mut());
17 for (
bool todo =
true; todo;) {
29 for (
const auto& [f, def] :
world().flags2annex()) new_world.register_annex(f, rewriter.
rewrite(def));
30 for (
auto mut :
world().externals()) {
32 new_mut->make_external();
35 swap(
world(), new_world);
39 for (
auto& phase :
phases()) phase->run();
void start() override
Actual entry.
T * as_mut() const
Asserts that this is a mutable, casts constness away and performs a static_cast to T.
void start() override
Actual entry.
virtual void run()
Entry point and generates some debug output; invokes Phase::start.
std::string_view name() const
virtual void start()=0
Actual entry.
void start() override
Actual entry.
const auto & phases() const
void start() override
Actual entry.
Recurseivly rewrites part of a program into the provided World.
World inherit()
Inherits the state into the new World.
World & verify()
Verifies that all externals() and annexes() are Def::is_closed(), if MIM_ENABLE_CHECKS.