Module Flambda.Named
type t = Flambda2_terms.Flambda.namedThe defining expressions of Let bindings.
include Flambda2_terms.Expr_std.S with type t := Flambda2_terms.Flambda.Named.t
val print : Stdlib.Format.formatter -> Flambda2_terms.Flambda.Named.t -> unitinclude Flambda2_nominal.Contains_names.S
with type t := Flambda2_terms.Flambda.Named.t
val free_names :
Flambda2_terms.Flambda.Named.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 :
Flambda2_terms.Flambda.Named.t ->
Flambda2_nominal.Renaming.t ->
Flambda2_terms.Flambda.Named.tApply a renaming throughout a term.
val create_simple :
Flambda2_term_basics.Simple.t ->
Flambda2_terms.Flambda.Named.tConvert a register-width value into the defining expression of a Let.
val create_var :
Flambda2_identifiers.Variable.t ->
Flambda2_terms.Flambda.Named.tLike create_simple but for variables.
val create_prim :
Flambda2_terms.Flambda_primitive.t ->
Debuginfo.t ->
Flambda2_terms.Flambda.Named.tConvert a primitive, with associated debugging information, into the defining expression of a Let.
val create_set_of_closures :
Flambda2_terms.Set_of_closures.t ->
Flambda2_terms.Flambda.Named.tConvert a set of closures into the defining expression of a Let.
val create_static_consts :
Flambda2_terms.Flambda.static_const_group ->
Flambda2_terms.Flambda.Named.tConvert one or more statically-allocated constants into the defining expression of a Let.
val create_rec_info :
Flambda2_term_basics.Rec_info_expr.t ->
Flambda2_terms.Flambda.Named.tConvert one or more expressions for recursion state into the defining expression of a Let.
val dummy_value :
machine_width:Target_system.Machine_width.t ->
Flambda2_kinds.Flambda_kind.t ->
Flambda2_terms.Flambda.Named.tReturn a defining expression for a Let which is kind-correct, but not necessarily type-correct, at the given kind.
val kind : Flambda2_terms.Flambda.Named.t -> Flambda2_kinds.Flambda_kind.tReturn the kind of the expression. Must only be used on expressions bound to a singleton pattern (everything except sets of closures and static consts).
val is_dynamically_allocated_set_of_closures :
Flambda2_terms.Flambda.Named.t ->
boolReturns true iff the given expression is a set of closures that will be allocated on the OCaml heap during execution (i.e. not a statically-allocated set of closures).
val is_static_consts : Flambda2_terms.Flambda.Named.t -> boolReturns true iff the given expression is one or more statically-allocated constants.
val must_be_static_consts :
Flambda2_terms.Flambda.Named.t ->
Flambda2_terms.Flambda.static_const_groupval at_most_generative_effects : Flambda2_terms.Flambda.Named.t -> boolval fold_code_and_sets_of_closures :
Flambda2_terms.Flambda.Named.t ->
init:'a ->
f_code:
('a ->
Flambda2_terms.Flambda.function_params_and_body Flambda2_terms.Code0.t ->
'a) ->
f_set:('a -> Flambda2_terms.Set_of_closures.t -> 'a) ->
'a