Module Flambda2_terms.Code
A piece of code, comprising of the parameters and body of a function, together with a field indicating whether the piece of code is a newer version of one that existed previously (and may still exist), for example after a round of simplification.
val code_metadata : t -> Code_metadata.tval params_and_body : t -> Flambda.Function_params_and_body.tinclude Code_metadata.Code_metadata_accessors_result_type with type 'a t := t
val code_id : t -> Flambda2_identifiers.Code_id.tval newer_version_of : t -> Flambda2_identifiers.Code_id.t optionval params_arity : t -> [ `Complex ] Flambda2_kinds.Flambda_arity.tval param_modes : t -> Flambda2_bound_identifiers.Alloc_mode.For_types.t listval first_complex_local_param : t -> intval result_arity : t -> [ `Unarized ] Flambda2_kinds.Flambda_arity.tval result_types : t -> Result_types.t Flambda2_lattices.Or_unknown_or_bottom.tval result_mode : t -> Lambda.locality_modeval stub : t -> boolval inline : t -> Inline_attribute.tval zero_alloc_attribute : t -> Zero_alloc_attribute.tval poll_attribute : t -> Poll_attribute.tval regalloc_attribute : t -> Regalloc_attribute.tval regalloc_param_attribute : t -> Regalloc_param_attribute.tval cold : t -> boolval is_a_functor : t -> boolval is_opaque : t -> boolval recursive : t -> Recursive.tval cost_metrics : t -> Cost_metrics.tval inlining_arguments : t -> Inlining_arguments.tval dbg : t -> Debuginfo.tval is_tupled : t -> boolval is_my_closure_used : t -> boolval inlining_decision : t -> Function_decl_inlining_decision_type.tval absolute_history : t -> Inlining_history.Absolute.tval relative_history : t -> Inlining_history.Relative.tval loopify : t -> Loopify_attribute.tval function_slot_size : t -> intval create_with_metadata :
params_and_body:Flambda.Function_params_and_body.t ->
free_names_of_params_and_body:Flambda2_nominal.Name_occurrences.t ->
code_metadata:Code_metadata.t ->
tval create :
params_and_body:Flambda.Function_params_and_body.t ->
free_names_of_params_and_body:Flambda2_nominal.Name_occurrences.t ->
t Code_metadata.create_typeval with_code_id : Flambda2_identifiers.Code_id.t -> t -> tval with_params_and_body :
params_and_body:Flambda.Function_params_and_body.t ->
free_names_of_params_and_body:Flambda2_nominal.Name_occurrences.t ->
cost_metrics:Cost_metrics.t ->
t ->
tval with_newer_version_of : Flambda2_identifiers.Code_id.t option -> t -> tval print : Format.formatter -> t -> unitinclude Flambda2_nominal.Contains_names.S with type t := t
val free_names : t -> Flambda2_nominal.Name_occurrences.tCompute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)
val apply_renaming : t -> Flambda2_nominal.Renaming.t -> tApply a renaming throughout a term.
val ids_for_export : t -> Flambda2_nominal.Ids_for_export.tval map_result_types : t -> f:(Flambda2_types.t -> Flambda2_types.t) -> tval free_names_of_params_and_body : t -> Flambda2_nominal.Name_occurrences.t