jon.recoil.org

Module Closure_conversion_aux.Acc

Used to pipe some data through closure conversion

type closure_info = private {
  1. code_id : Flambda2_identifiers.Code_id.t;
  2. return_continuation : Flambda2_identifiers.Continuation.t;
  3. exn_continuation : Flambda2_terms.Exn_continuation.t;
  4. my_closure : Flambda2_identifiers.Variable.t;
  5. is_purely_tailrec : bool;
  6. slot_offsets_at_definition : Flambda2_simplify_shared.Slot_offsets.t;
}
type t
val create : cmx_loader:Flambda2_cmx.Flambda_cmx.loader -> machine_width:Target_system.Machine_width.t -> t
val manufacture_symbol_short_name : t -> t * Linkage_name.t
val machine_width : t -> Target_system.Machine_width.t
val seen_a_function : t -> bool
val with_seen_a_function : t -> bool -> t
val add_declared_symbol : symbol:Flambda2_identifiers.Symbol.t -> constant:Flambda2_terms.Static_const.t -> t -> t
val add_shareable_constant : symbol:Flambda2_identifiers.Symbol.t -> constant:Flambda2_terms.Static_const.t -> t -> t
val add_free_names : Flambda2_nominal.Name_occurrences.t -> t -> t
val remove_var_from_free_names : Flambda2_identifiers.Variable.t -> t -> t
val remove_var_opt_from_free_names : Flambda2_identifiers.Variable.t option -> t -> t
val remove_continuation_from_free_names : Flambda2_identifiers.Continuation.t -> t -> t
val mark_continuation_as_untrackable : Flambda2_identifiers.Continuation.t -> t -> t
val continuation_known_arguments : cont:Flambda2_identifiers.Continuation.t -> t -> Env.value_approximation list option
val with_free_names : Flambda2_nominal.Name_occurrences.t -> t -> t
val eval_branch_free_names : t -> f:(t -> t * 'a) -> Flambda2_nominal.Name_occurrences.t * t * 'a
val cost_metrics : t -> Flambda2_terms.Cost_metrics.t
val increment_metrics : Flambda2_terms.Cost_metrics.t -> t -> t
val with_cost_metrics : Flambda2_terms.Cost_metrics.t -> t -> t
val measure_cost_metrics : t -> f:(t -> t * 'a) -> Flambda2_terms.Cost_metrics.t * Flambda2_nominal.Name_occurrences.t * t * 'a
val add_offsets_from_code : t -> Flambda2_identifiers.Code_id.t -> t
val add_set_of_closures_offsets : is_phantom:bool -> t -> Flambda2_terms.Set_of_closures.t -> t
val top_closure_info : t -> closure_info option
val push_closure_info : t -> return_continuation:Flambda2_identifiers.Continuation.t -> exn_continuation:Flambda2_terms.Exn_continuation.t -> my_closure:Flambda2_identifiers.Variable.t -> is_purely_tailrec:bool -> code_id:Flambda2_identifiers.Code_id.t -> t
val pop_closure_info : t -> closure_info * t
val add_symbol_approximation : t -> Flambda2_identifiers.Symbol.t -> Env.value_approximation -> t
val find_symbol_approximation : t -> Flambda2_identifiers.Symbol.t -> Env.value_approximation