jon.recoil.org

Module Flambda2_simplify.Non_constructed_code

Code without any function bodies, but with all the associated metadata, e.g. free names.

val code_metadata : t -> Flambda2_terms.Code_metadata.t
include Flambda2_terms.Code_metadata.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 zero_alloc_attribute : t -> Flambda2_terms.Zero_alloc_attribute.t
val poll_attribute : t -> Flambda2_terms.Poll_attribute.t
val regalloc_attribute : t -> Flambda2_terms.Regalloc_attribute.t
val regalloc_param_attribute : t -> Flambda2_terms.Regalloc_param_attribute.t
val cold : t -> bool
val is_a_functor : t -> bool
val is_opaque : t -> bool
val recursive : t -> Flambda2_terms.Recursive.t
val cost_metrics : t -> Flambda2_terms.Cost_metrics.t
val inlining_arguments : t -> Flambda2_terms.Inlining_arguments.t
val dbg : t -> Debuginfo.t
val is_tupled : t -> bool
val is_my_closure_used : t -> bool
val function_slot_size : t -> int
val create_with_metadata : free_names_of_params_and_body:Flambda2_nominal.Name_occurrences.t -> code_metadata:Flambda2_terms.Code_metadata.t -> t
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 print : Format.formatter -> t -> unit