jon.recoil.org

Module Closure_conversion_aux.Env

Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

type t
val create : big_endian:bool -> t

Create an environment marked as being at toplevel.

val set_not_at_toplevel : t -> t
val at_toplevel : t -> bool
val clear_local_bindings : t -> t
val find_name : t -> Ident.t -> Flambda2_identifiers.Name.t
val find_name_exn : t -> Ident.t -> Flambda2_identifiers.Name.t
val add_global : t -> int -> Flambda2_identifiers.Symbol.t -> t
val find_global : t -> int -> Flambda2_identifiers.Symbol.t
val add_var_approximation : t -> Flambda2_identifiers.Variable.t -> value_approximation -> t
val find_var_approximation : t -> Flambda2_identifiers.Variable.t -> value_approximation
val current_depth : t -> Flambda2_identifiers.Variable.t option
val with_depth : t -> Flambda2_identifiers.Variable.t -> t
val current_unit : t -> Compilation_unit.t
val big_endian : t -> bool
val set_path_to_root : t -> Debuginfo.Scoped_location.t -> t
val path_to_root : t -> Debuginfo.Scoped_location.t
val use_inlining_history_tracker : t -> Flambda2_terms.Inlining_history.Tracker.t -> t
val inlining_history_tracker : t -> Flambda2_terms.Inlining_history.Tracker.t
val relative_history_from_scoped : loc:Debuginfo.Scoped_location.t -> t -> Flambda2_terms.Inlining_history.Relative.t