9 auto& world = arg->
world();
10 auto& driver = world.
driver();
11 if (
auto str =
tuple2str(arg); !str.empty())
return world.lit_bool(driver.is_loaded(driver.sym(str)));
18 auto& world = arg->
world();
19 auto& driver = world.
driver();
20 for (
const auto& a : driver.args(driver.sym(
"compile"))) {
22 if (a ==
"aggr=tt" || a ==
"aggr=on" || a ==
"aggr=true" || a ==
"aggr")
return world.lit_tt();
23 if (a ==
"aggr=ff" || a ==
"aggr=off" || a ==
"aggr=false")
return world.lit_ff();
31 auto& world = phase->
world();
32 auto& driver = world.
driver();
33 auto name = callee->as<
App>()->arg();
34 if (
auto str =
tuple2str(name); !str.empty() && driver.is_loaded(driver.sym(str)))
return phase;
World & world() const noexcept
const Driver & driver() const
#define MIM_compile_NORMALIZER_IMPL
const Def * normalize_cond(const Def *, const Def *callee, const Def *phase)
compile.cond name phase ↦ phase if name's plugin is loaded, else compile.null.
const Def * normalize_is_loaded(const Def *, const Def *, const Def *arg)
const Def * normalize_aggr(const Def *, const Def *, const Def *arg)
compile.aggr fallback ↦ tt/ff if -X compile:aggr=on/=off was passed, else fallback.
std::string tuple2str(const Def *)
static consteval flags_t base()