package ocaml-base-compiler

  1. Overview
  2. Docs
type machtype_component =
  1. | Val
  2. | Addr
  3. | Int
  4. | Float
type machtype = machtype_component array
val typ_void : machtype
val typ_val : machtype
val typ_addr : machtype
val typ_int : machtype
val typ_float : machtype
val size_component : machtype_component -> int

Least upper bound of two machtype_components.

val ge_component : machtype_component -> machtype_component -> bool

Returns true iff the first supplied machtype_component is greater than or equal to the second under the relation used by lub_component.

val size_machtype : machtype -> int
type comparison =
  1. | Ceq
  2. | Cne
  3. | Clt
  4. | Cle
  5. | Cgt
  6. | Cge
val negate_comparison : comparison -> comparison
val swap_comparison : comparison -> comparison
type label = int
val new_label : unit -> label
type raise_kind =
  1. | Raise_withtrace
  2. | Raise_notrace
type memory_chunk =
  1. | Byte_unsigned
  2. | Byte_signed
  3. | Sixteen_unsigned
  4. | Sixteen_signed
  5. | Thirtytwo_unsigned
  6. | Thirtytwo_signed
  7. | Word_int
  8. | Word_val
  9. | Single
  10. | Double
  11. | Double_u
and operation =
  1. | Capply of machtype * Debuginfo.t
  2. | Cextcall of string * machtype * bool * Debuginfo.t * label option
  3. | Cload of memory_chunk
  4. | Calloc of Debuginfo.t
  5. | Cstore of memory_chunk * Lambda.initialization_or_assignment
  6. | Caddi
  7. | Csubi
  8. | Cmuli
  9. | Cmulhi
  10. | Cdivi
  11. | Cmodi
  12. | Cand
  13. | Cor
  14. | Cxor
  15. | Clsl
  16. | Clsr
  17. | Casr
  18. | Ccmpi of comparison
  19. | Caddv
  20. | Cadda
  21. | Ccmpa of comparison
  22. | Cnegf
  23. | Cabsf
  24. | Caddf
  25. | Csubf
  26. | Cmulf
  27. | Cdivf
  28. | Cfloatofint
  29. | Cintoffloat
  30. | Ccmpf of comparison
  31. | Craise of raise_kind * Debuginfo.t
  32. | Ccheckbound of Debuginfo.t
and expression =
  1. | Cconst_int of int
  2. | Cconst_natint of nativeint
  3. | Cconst_float of float
  4. | Cconst_symbol of string
  5. | Cconst_pointer of int
  6. | Cconst_natpointer of nativeint
  7. | Cblockheader of nativeint * Debuginfo.t
  8. | Cvar of Ident.t
  9. | Clet of Ident.t * expression * expression
  10. | Cassign of Ident.t * expression
  11. | Ctuple of expression list
  12. | Cop of operation * expression list
  13. | Csequence of expression * expression
  14. | Cifthenelse of expression * expression * expression
  15. | Cswitch of expression * int array * expression array
  16. | Cloop of expression
  17. | Ccatch of int * Ident.t list * expression * expression
  18. | Cexit of int * expression list
  19. | Ctrywith of expression * Ident.t * expression
type fundecl = {
  1. fun_name : string;
  2. fun_args : (Ident.t * machtype) list;
  3. fun_body : expression;
  4. fun_fast : bool;
  5. fun_dbg : Debuginfo.t;
}
type data_item =
  1. | Cdefine_symbol of string
  2. | Cglobal_symbol of string
  3. | Cint8 of int
  4. | Cint16 of int
  5. | Cint32 of nativeint
  6. | Cint of nativeint
  7. | Csingle of float
  8. | Cdouble of float
  9. | Csymbol_address of string
  10. | Cstring of string
  11. | Cskip of int
  12. | Calign of int
type phrase =
  1. | Cfunction of fundecl
  2. | Cdata of data_item list
val reset : unit -> unit