Module Flambda.Function_params_and_body
type t = function_params_and_bodyA name abstraction that comprises a function's parameters (together with any relations between them), the code of the function, and the my_* variables giving access to the closure, current region, etc. It also includes the return and exception continuations.
These values are bound using Define_symbol constructs (see Flambda_static).
From the body of the function, accesses to variables within the closure need to go via a Project_value_slot (from my_closure); accesses to any other simultaneously-defined functions need to go likewise via a Project_function_slot.
include Expr_std.S_no_free_names with type t := t
val print : Format.formatter -> t -> unitval apply_renaming : t -> Flambda2_nominal.Renaming.t -> tinclude Flambda2_nominal.Contains_ids.S with type t := t
val ids_for_export : t -> Flambda2_nominal.Ids_for_export.tGather all table identifiers to export them.
val create :
return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
body:expr ->
free_names_of_body:
Flambda2_nominal.Name_occurrences.t Flambda2_lattices.Or_unknown.t ->
my_closure:Flambda2_identifiers.Variable.t ->
my_alloc_mode:Flambda2_bound_identifiers.Alloc_mode.For_applications.t ->
my_depth:Flambda2_identifiers.Variable.t ->
tCreate an abstraction that binds the given parameters, with associated relations thereon, over the given body.
val pattern_match :
t ->
f:
(return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
body:expr ->
my_closure:Flambda2_identifiers.Variable.t ->
is_my_closure_used:bool Flambda2_lattices.Or_unknown.t ->
my_alloc_mode:Flambda2_bound_identifiers.Alloc_mode.For_applications.t ->
my_depth:Flambda2_identifiers.Variable.t ->
free_names_of_body:
Flambda2_nominal.Name_occurrences.t Flambda2_lattices.Or_unknown.t ->
'a) ->
'aChoose a member of the alpha-equivalence class to enable examination of the parameters, relations thereon and the body over which they are scoped.
val pattern_match_pair :
t ->
t ->
f:
(return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
body1:expr ->
body2:expr ->
my_closure:Flambda2_identifiers.Variable.t ->
my_alloc_mode:Flambda2_bound_identifiers.Alloc_mode.For_applications.t ->
my_depth:Flambda2_identifiers.Variable.t ->
'a) ->
'aChoose members of the alpha-equivalence classes of two definitions using the same names for the return continuation, the exception continuation, the closure, and all parameters.
val is_my_closure_used : t -> bool