14 using Scope = fe::SymMap<std::pair<Loc, const Def*>>;
18 void push() { scopes_.emplace_back(); }
24 void bind(
Dbg dbg,
const Def* def,
bool rebind =
false) {
bind(&scopes_.back(), dbg, def, rebind); }
25 void swap(
Scope& other) { std::swap(scopes_.back(), other); }
28 std::deque<Scope> scopes_;
A Scope represents a region of Defs that are live from the view of an entry's Var.
const Def * query(Dbg) const
void bind(Scope *, Dbg, const Def *, bool rebind=false)
fe::SymMap< std::pair< Loc, const Def * > > Scope
const Def * find(Dbg) const
Same as Scopes::query but potentially raises an error.
void bind(Dbg dbg, const Def *def, bool rebind=false)