Documentation

Lean.Compiler.IR.ToIR

Marks an extern definition to be guaranteed to always return tagged values. This information is used to optimize reference counting in the compiler.

  • nextId : Nat
  • 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 Void is 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 form let x := y which might occur when for example projecting out of a trivial structure where previously a binding would've been let x := proj y i and now becomes let 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
    @[reducible, inline]
    abbrev Lean.IR.ToIR.M (α : Type) :
    Equations
      Instances For
        def Lean.IR.ToIR.M.run {α : Type} (x : M α) :
        Equations
          Instances For
            Equations
              Instances For
                Equations
                  Instances For
                    Equations
                      Instances For
                        def Lean.IR.ToIR.bindVarToVarId (fvarId : FVarId) (varId : VarId) :
                        Equations
                          Instances For
                            Equations
                              Instances For
                                Equations
                                  Instances For
                                    Equations
                                      Instances For
                                        Equations
                                          Instances For
                                            Equations
                                              Instances For
                                                Equations
                                                  Instances For
                                                    Instances For
                                                      Equations
                                                        Instances For
                                                          Equations
                                                            Instances For
                                                              Equations
                                                                Instances For
                                                                  Equations
                                                                    Instances For
                                                                      Equations
                                                                        Instances For