package js_of_ocaml-compiler
Module Js_of_ocaml_compiler.CodeSource
Source
type constant = | String of string| NativeString of Native_string.t| Float of float| Float_array of float array| Int64 of int64| Tuple of int * constant array * array_or_not| Int of int32
fold_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, 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.
Source
val fold_closures_innermost_first :
program ->
(Var.t option -> Var.t list -> cont -> '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.
Source
val traverse :
fold_blocs_poly ->
(Addr.t -> 'c -> 'c) ->
Addr.t ->
block Addr.Map.t ->
'c ->
'cSource
val preorder_traverse :
fold_blocs_poly ->
(Addr.t -> 'c -> 'c) ->
Addr.t ->
block Addr.Map.t ->
'c ->
'c