Marks an extern definition to be guaranteed to always return tagged values. This information is used to optimize reference counting in the compiler.
- vars : Std.HashMap FVarId Arg
- joinPoints : Std.HashMap FVarId JoinPointId
- nextId : Nat
- subst : Compiler.LCNF.FVarSubst
We keep around a substitution here because we run a second trivial structure elimination when converting to IR. This elimination is aware of the fact that
Voidis irrelevant while the first one in LCNF isn't because LCNF is still pure. However, IR does not allow us to have bindings of the formlet x := ywhich might occur when for example projecting out of a trivial structure where previously a binding would've beenlet x := proj y iand now becomeslet x := y. For this reason we carry around these kinds of bindings in this substitution and apply it whenever we access an fvar in the conversion.
Instances For
Equations
Instances For
- expr (e : Expr) : TranslatedProj
- erased : TranslatedProj