Module Closure_conversion_aux.Acc
Used to pipe some data through closure conversion
type closure_info = private {code_id : Flambda2_identifiers.Code_id.t;return_continuation : Flambda2_identifiers.Continuation.t;exn_continuation : Flambda2_terms.Exn_continuation.t;my_closure : Flambda2_identifiers.Variable.t;is_purely_tailrec : bool;slot_offsets_at_definition : Flambda2_simplify_shared.Slot_offsets.t;
}val create :
cmx_loader:Flambda2_cmx.Flambda_cmx.loader ->
machine_width:Target_system.Machine_width.t ->
tval manufacture_symbol_short_name : t -> t * Linkage_name.tval declared_symbols :
t ->
(Flambda2_identifiers.Symbol.t * Flambda2_terms.Static_const.t) listval lifted_sets_of_closures :
t ->
(Flambda2_identifiers.Symbol.t Flambda2_identifiers.Function_slot.Lmap.t
* Flambda2_terms.Flambda.Set_of_closures.t)
listval code : t -> Flambda2_terms.Code.t Flambda2_identifiers.Code_id.Lmap.tval code_map : t -> Flambda2_terms.Code.t Flambda2_identifiers.Code_id.Map.tval free_names : t -> Flambda2_nominal.Name_occurrences.tval machine_width : t -> Target_system.Machine_width.tval seen_a_function : t -> boolval add_declared_symbol :
symbol:Flambda2_identifiers.Symbol.t ->
constant:Flambda2_terms.Static_const.t ->
t ->
tval add_lifted_set_of_closures :
symbols:
Flambda2_identifiers.Symbol.t Flambda2_identifiers.Function_slot.Lmap.t ->
set_of_closures:Flambda2_terms.Flambda.Set_of_closures.t ->
t ->
tval add_code :
code_id:Flambda2_identifiers.Code_id.t ->
code:Flambda2_terms.Code.t ->
?slot_offsets:Flambda2_simplify_shared.Slot_offsets.t ->
t ->
tval add_free_names : Flambda2_nominal.Name_occurrences.t -> t -> tval remove_var_from_free_names : Flambda2_identifiers.Variable.t -> t -> tval remove_var_opt_from_free_names :
Flambda2_identifiers.Variable.t option ->
t ->
tval remove_continuation_from_free_names :
Flambda2_identifiers.Continuation.t ->
t ->
tval mark_continuation_as_untrackable :
Flambda2_identifiers.Continuation.t ->
t ->
tval continuation_known_arguments :
cont:Flambda2_identifiers.Continuation.t ->
t ->
Env.value_approximation list optionval with_free_names : Flambda2_nominal.Name_occurrences.t -> t -> tval eval_branch_free_names :
t ->
f:(t -> t * 'a) ->
Flambda2_nominal.Name_occurrences.t * t * 'aval cost_metrics : t -> Flambda2_terms.Cost_metrics.tval increment_metrics : Flambda2_terms.Cost_metrics.t -> t -> tval with_cost_metrics : Flambda2_terms.Cost_metrics.t -> t -> tval measure_cost_metrics :
t ->
f:(t -> t * 'a) ->
Flambda2_terms.Cost_metrics.t * Flambda2_nominal.Name_occurrences.t * t * 'aval slot_offsets : t -> Flambda2_simplify_shared.Slot_offsets.tval code_slot_offsets :
t ->
Flambda2_simplify_shared.Slot_offsets.t Flambda2_identifiers.Code_id.Map.tval add_offsets_from_code : t -> Flambda2_identifiers.Code_id.t -> tval add_set_of_closures_offsets :
is_phantom:bool ->
t ->
Flambda2_terms.Set_of_closures.t ->
tval top_closure_info : t -> closure_info optionval 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 ->
tval pop_closure_info : t -> closure_info * tval add_symbol_approximation :
t ->
Flambda2_identifiers.Symbol.t ->
Env.value_approximation ->
tval find_symbol_approximation :
t ->
Flambda2_identifiers.Symbol.t ->
Env.value_approximationval symbol_approximations :
t ->
Env.value_approximation Flambda2_identifiers.Symbol.Map.t