Module Flambda.Function_params_and_body
A 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 Flambda2_terms.Expr_std.S_no_free_names
with type t := Flambda2_terms.Flambda.Function_params_and_body.t
val print :
Stdlib.Format.formatter ->
Flambda2_terms.Flambda.Function_params_and_body.t ->
unitinclude Flambda2_nominal.Contains_ids.S
with type t := Flambda2_terms.Flambda.Function_params_and_body.t
val ids_for_export :
Flambda2_terms.Flambda.Function_params_and_body.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:Flambda2_terms.Flambda.expr ->
free_names_of_body:
Flambda2_nominal.Name_occurrences.t Flambda2_lattices.Or_unknown.t ->
my_closure:Flambda2_identifiers.Variable.t ->
my_region:Flambda2_identifiers.Variable.t option ->
my_ghost_region:Flambda2_identifiers.Variable.t option ->
my_depth:Flambda2_identifiers.Variable.t ->
Flambda2_terms.Flambda.Function_params_and_body.tCreate an abstraction that binds the given parameters, with associated relations thereon, over the given body.
val pattern_match :
Flambda2_terms.Flambda.Function_params_and_body.t ->
f:
(return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
body:Flambda2_terms.Flambda.expr ->
my_closure:Flambda2_identifiers.Variable.t ->
is_my_closure_used:bool Flambda2_lattices.Or_unknown.t ->
my_region:Flambda2_identifiers.Variable.t option ->
my_ghost_region:Flambda2_identifiers.Variable.t option ->
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 :
Flambda2_terms.Flambda.Function_params_and_body.t ->
Flambda2_terms.Flambda.Function_params_and_body.t ->
f:
(return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
body1:Flambda2_terms.Flambda.expr ->
body2:Flambda2_terms.Flambda.expr ->
my_closure:Flambda2_identifiers.Variable.t ->
my_region:Flambda2_identifiers.Variable.t option ->
my_ghost_region:Flambda2_identifiers.Variable.t option ->
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 :
Flambda2_terms.Flambda.Function_params_and_body.t ->
bool