jon.recoil.org

Module Js_of_ocaml_compiler.Code

module Addr : sig ... end
module Var : sig ... end
type prim =
  1. | Vectlength
  2. | Array_get
  3. | Extern of string
  4. | Not
  5. | IsInt
  6. | Eq
  7. | Neq
  8. | Lt
  9. | Le
  10. | Ult
type array_or_not =
  1. | Array
  2. | NotArray
  3. | Unknown
module Native_string : sig ... end
type constant =
  1. | String of string
  2. | NativeString of Js_of_ocaml_compiler.Code.Native_string.t
  3. | Float of Js_of_ocaml_compiler.Stdlib.Int64.t
  4. | Float_array of Js_of_ocaml_compiler.Stdlib.Int64.t array
  5. | Int of Js_of_ocaml_compiler.Targetint.t
  6. | Int32 of Js_of_ocaml_compiler.Stdlib.Int32.t
    (*

    Only produced when compiling to WebAssembly.

    *)
  7. | Int64 of Js_of_ocaml_compiler.Stdlib.Int64.t
  8. | NativeInt of Js_of_ocaml_compiler.Stdlib.Int32.t
    (*

    Only produced when compiling to WebAssembly.

    *)
  9. | Tuple of int * Js_of_ocaml_compiler.Code.constant array * Js_of_ocaml_compiler.Code.array_or_not
module Constant : sig ... end
val location_of_pc : int -> Js_of_ocaml_compiler.Code.loc
type special =
  1. | Alias_prim of string
type mutability =
  1. | Immutable
  2. | Maybe_mutable
type field_type =
  1. | Non_float
  2. | Float
module Print : sig ... end
type fold_blocs_poly = {
  1. fold : 'a. 'a Js_of_ocaml_compiler.Code.fold_blocs;
}

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, 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.

Similar 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.

Similar 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_skip_try_body : 'c Js_of_ocaml_compiler.Code.fold_blocs

Last instruction of a block body, ignoring events

val is_empty : Js_of_ocaml_compiler.Code.program -> bool
val check_updates : name:string -> Js_of_ocaml_compiler.Code.program -> Js_of_ocaml_compiler.Code.program -> updates:int -> unit
val invariant : Js_of_ocaml_compiler.Code.program -> unit