jon.recoil.org

Module Flambda.Named

The defining expressions of Let bindings.

include Flambda2_terms.Expr_std.S with type t := Flambda2_terms.Flambda.Named.t
include Flambda2_nominal.Contains_names.S with type t := Flambda2_terms.Flambda.Named.t

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

Apply a renaming throughout a term.

Convert a register-width value into the defining expression of a Let.

Like create_simple but for variables.

Convert a primitive, with associated debugging information, into the defining expression of a Let.

Convert a set of closures into the defining expression of a Let.

Convert one or more statically-allocated constants into the defining expression of a Let.

Convert one or more expressions for recursion state into the defining expression of a Let.

Return a defining expression for a Let which is kind-correct, but not necessarily type-correct, at the given kind.

Return 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 -> bool

Returns 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 -> bool

Returns true iff the given expression is one or more statically-allocated constants.

val at_most_generative_effects : Flambda2_terms.Flambda.Named.t -> bool
val 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