Js_of_ocaml_compiler.Codemodule Addr : sig ... endmodule Var : sig ... endmodule Native_string : sig ... endtype constant = | String of string| NativeString of Native_string.t| Float of Stdlib.Int64.t| Float_array of Stdlib.Int64.t array| Int of Targetint.t| Int32 of Stdlib.Int32.tOnly produced when compiling to WebAssembly.
*)| Int64 of Stdlib.Int64.t| NativeInt of Stdlib.Int32.tOnly produced when compiling to WebAssembly.
*)| Tuple of int * constant array * array_or_notmodule Constant : sig ... endval noloc : locval location_of_pc : int -> loctype expr = | Apply of {}| Block of int * Var.t array * array_or_not * mutability| Field of Var.t * int * field_type| Closure of Var.t list * cont * Parse_info.t option| Constant of constant| Prim of prim * prim_arg list| Special of specialmodule Print : sig ... endval fold_closures :
program ->
(Var.t option -> Var.t list -> cont -> Parse_info.t option -> 'd -> 'd) ->
'd ->
'dfold_closures p f init folds f over all closures in the program p, starting from the initial value init. For each closure, f is called with the following arguments: the closure name (enclosed in Stdlib.Some), its parameter list, the address and parameter instantiation of its first block, the optional closure location and the current accumulator. In addition, f is called on the initial block p.start, with None as the closure name. All closures in all blocks of p are included in the fold, not only the ones reachable from p.start.
val fold_closures_innermost_first :
program ->
(Var.t option -> Var.t list -> cont -> Parse_info.t option -> 'd -> 'd) ->
'd ->
'dSimilar to fold_closures, but applies the fold function to the innermost closures first. Unlike with fold_closures, only the closures reachable from p.start are considered.
val fold_closures_outermost_first :
program ->
(Var.t option -> Var.t list -> cont -> Parse_info.t option -> 'd -> 'd) ->
'd ->
'dSimilar to fold_closures, but applies the fold function to the outermost closures first. Unlike with fold_closures, only the closures reachable from p.start are considered.
val fold_children : 'c fold_blocsval fold_children_skip_try_body : 'c fold_blocsval return_values : program -> Var.Set.t Var.Map.tval traverse :
fold_blocs_poly ->
(Addr.t -> 'c -> 'c) ->
Addr.t ->
block Addr.Map.t ->
'c ->
'cval preorder_traverse :
fold_blocs_poly ->
(Addr.t -> 'c -> 'c) ->
Addr.t ->
block Addr.Map.t ->
'c ->
'cval used_blocks : program -> Stdlib.BitSet.tval empty : programval is_empty : program -> boolval invariant : program -> unit