jon.recoil.org

Module Flambda2_terms.Code_metadata

type t
type code_metadata = t
module type Metadata_view_type = sig ... end
module type Code_metadata_accessors_result_type = sig ... end
include Code_metadata_accessors_result_type with type 'a t := t
val newer_version_of : t -> Flambda2_identifiers.Code_id.t option
val params_arity : t -> [ `Complex ] Flambda2_kinds.Flambda_arity.t
val first_complex_local_param : t -> int
val result_arity : t -> [ `Unarized ] Flambda2_kinds.Flambda_arity.t
val result_mode : t -> Lambda.locality_mode
val stub : t -> bool
val inline : t -> Inline_attribute.t
val zero_alloc_attribute : t -> Zero_alloc_attribute.t
val poll_attribute : t -> Poll_attribute.t
val regalloc_attribute : t -> Regalloc_attribute.t
val regalloc_param_attribute : t -> Regalloc_param_attribute.t
val cold : t -> bool
val is_a_functor : t -> bool
val is_opaque : t -> bool
val recursive : t -> Recursive.t
val cost_metrics : t -> Cost_metrics.t
val inlining_arguments : t -> Inlining_arguments.t
val dbg : t -> Debuginfo.t
val is_tupled : t -> bool
val is_my_closure_used : t -> bool
val inlining_decision : t -> Function_decl_inlining_decision_type.t
val absolute_history : t -> Inlining_history.Absolute.t
val relative_history : t -> Inlining_history.Relative.t
val loopify : t -> Loopify_attribute.t
val function_slot_size : t -> int
type 'a create_type = Flambda2_identifiers.Code_id.t -> newer_version_of:Flambda2_identifiers.Code_id.t option -> params_arity:[ `Complex ] Flambda2_kinds.Flambda_arity.t -> param_modes:Flambda2_bound_identifiers.Alloc_mode.For_types.t list -> first_complex_local_param:int -> result_arity:[ `Unarized ] Flambda2_kinds.Flambda_arity.t -> result_types:Result_types.t Flambda2_lattices.Or_unknown_or_bottom.t -> result_mode:Lambda.locality_mode -> stub:bool -> inline:Inline_attribute.t -> zero_alloc_attribute:Zero_alloc_attribute.t -> poll_attribute:Poll_attribute.t -> regalloc_attribute:Regalloc_attribute.t -> regalloc_param_attribute:Regalloc_param_attribute.t -> cold:bool -> is_a_functor:bool -> is_opaque:bool -> recursive:Recursive.t -> cost_metrics:Cost_metrics.t -> inlining_arguments:Inlining_arguments.t -> dbg:Debuginfo.t -> is_tupled:bool -> is_my_closure_used:bool -> inlining_decision:Function_decl_inlining_decision_type.t -> absolute_history:Inlining_history.Absolute.t -> relative_history:Inlining_history.Relative.t -> loopify:Loopify_attribute.t -> 'a
val createk : (t -> 'a) -> 'a create_type
val create : t create_type
val with_code_id : Flambda2_identifiers.Code_id.t -> t -> t
val with_newer_version_of : Flambda2_identifiers.Code_id.t option -> t -> t
val with_cost_metrics : Cost_metrics.t -> t -> t
val with_is_my_closure_used : bool -> t -> t
val with_result_arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t -> t -> t
val with_params_arity : [ `Complex ] Flambda2_kinds.Flambda_arity.t -> t -> t
val with_param_modes : Flambda2_bound_identifiers.Alloc_mode.For_types.t list -> t -> t
val with_is_tupled : bool -> t -> t
val with_inlining_decision : Function_decl_inlining_decision_type.t -> t -> t
val print : Format.formatter -> t -> unit

free_names does not return occurrences of value slots inside the result_types.

include Flambda2_nominal.Contains_names.S with type t := t

Compute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)

val apply_renaming : t -> Flambda2_nominal.Renaming.t -> t

Apply a renaming throughout a term.

val ids_for_export : t -> Flambda2_nominal.Ids_for_export.t
val approx_equal : t -> t -> bool
val map_result_types : t -> f:(Flambda2_types.t -> Flambda2_types.t) -> t