Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
leissa committed Feb 19, 2025
1 parent 966edd8 commit efd0223
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions include/mim/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,18 @@ class Def : public fe::RuntimeCast<Def> {
///@}

/// @name Free Vars and Muts
/// * local_muts() / local_vars() are Var%s/mutables reachable by following *immutable* extended_ops().
/// * local_muts() / local_vars() are cached and hash-consed.
/// * free_vars() compute a global solution, i.e., by transitively following *mutables* as well.
/// * free_vars() are computed on demand and cached.
/// They will be transitively invalidated by following fv_consumers(), if a mutable is mutated.
///@{

/// Mutables reachable by following *immutable* extended_ops().
/// @note `mut->local_muts()` is by definition the set `{ mut }`.
Muts local_muts() const;
/// Var%s reachable by following *immutable* extended_ops().
/// @note `var->local_vars()` is by definition the set `{ var }`.
Vars local_vars() const { return mut_ ? Vars() : vars_.local; }
/// Compute a global solution, i.e., by transitively following *mutables* as well.
Vars free_vars() const;
Vars free_vars();
bool is_open() const; ///< Has free_vars()?
Expand Down
1 change: 0 additions & 1 deletion src/mim/def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ Vars Def::free_vars() const {
}

Vars Def::free_vars() {
// if (!isa_mut()) return const_cast<const Def*>(this)->free_vars();
if (!is_set()) return {};

if (!valid_) {
Expand Down

0 comments on commit efd0223

Please sign in to comment.