package js_of_ocaml-compiler

  1. Overview
  2. Docs
type addr = int
module DebugAddr : sig ... end
module Var : sig ... end
module VarSet : Set.S with type elt = Var.t
module VarMap : Map.S with type key = Var.t
module VarTbl : sig ... end
module VarISet : sig ... end
module AddrSet : Set.S with type elt = addr and type t = Util.IntSet.t
module AddrMap : Map.S with type key = addr and type 'a t = 'a Util.IntMap.t
type cont = addr * Var.t list
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 constant =
  1. | String of string
  2. | IString of string
  3. | Float of float
  4. | Float_array of float array
  5. | Int64 of int64
  6. | Tuple of int * constant array
  7. | Int of int32
type prim_arg =
  1. | Pv of Var.t
  2. | Pc of constant
type expr =
  1. | Const of int32
  2. | Apply of Var.t * Var.t list * bool
  3. | Block of int * Var.t array
  4. | Field of Var.t * int
  5. | Closure of Var.t list * cont
  6. | Constant of constant
  7. | Prim of prim * prim_arg list
type instr =
  1. | Let of Var.t * expr
  2. | Set_field of Var.t * int * Var.t
  3. | Offset_ref of Var.t * int
  4. | Array_set of Var.t * Var.t * Var.t
type cond =
  1. | IsTrue
  2. | CEq of int32
  3. | CLt of int32
  4. | CLe of int32
  5. | CUlt of int32
type last =
  1. | Return of Var.t
  2. | Raise of Var.t
  3. | Stop
  4. | Branch of cont
  5. | Cond of cond * Var.t * cont * cont
  6. | Switch of Var.t * cont array * cont array
  7. | Pushtrap of cont * Var.t * cont * AddrSet.t
  8. | Poptrap of cont * addr
type block = {
  1. params : Var.t list;
  2. handler : (Var.t * cont) option;
  3. body : instr list;
  4. branch : last;
}
type program = addr * block AddrMap.t * addr
type xinstr =
  1. | Instr of instr
  2. | Last of last
val print_var_list : Format.formatter -> Var.t list -> unit
val print_instr : Format.formatter -> instr -> unit
val print_block : (AddrMap.key -> xinstr -> string) -> int -> block -> unit
val print_program : (AddrMap.key -> xinstr -> string) -> program -> unit
val print_last : Format.formatter -> last -> unit
val print_cont : Format.formatter -> cont -> unit
val fold_closures : program -> (Var.t option -> Var.t list -> cont -> 'd -> 'd) -> 'd -> 'd
val fold_children : block AddrMap.t -> addr -> (addr -> 'c -> 'c) -> 'c -> 'c
val traverse : (block AddrMap.t -> addr -> (addr -> (AddrSet.t * 'c) -> AddrSet.t * 'c) -> (AddrSet.t * 'c) -> AddrSet.t * 'c) -> (addr -> 'c -> 'c) -> addr -> block AddrMap.t -> 'c -> 'c
val prepend : program -> instr list -> program
val empty : program
val eq : program -> program -> bool
val invariant : program -> unit
OCaml

Innovation. Community. Security.