ocaml-base-compiler

Official release 4.07.1
IN THIS PACKAGE
Module Cmm
type machtype_component =
| Val
| Addr
| Int
| 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 integer_comparison = Lambda.integer_comparison =
| Ceq
| Cne
| Clt
| Cgt
| Cle
| Cge
val negate_integer_comparison : integer_comparison -> integer_comparison
val swap_integer_comparison : integer_comparison -> integer_comparison
type float_comparison = Lambda.float_comparison =
| CFeq
| CFneq
| CFlt
| CFnlt
| CFgt
| CFngt
| CFle
| CFnle
| CFge
| CFnge
val negate_float_comparison : float_comparison -> float_comparison
val swap_float_comparison : float_comparison -> float_comparison
type label = int
val new_label : unit -> label
type raise_kind =
| Raise_withtrace
| Raise_notrace
type rec_flag =
| Nonrecursive
| Recursive
type memory_chunk =
| Byte_unsigned
| Byte_signed
| Sixteen_unsigned
| Sixteen_signed
| Thirtytwo_unsigned
| Thirtytwo_signed
| Word_int
| Word_val
| Single
| Double
| Double_u
and operation =
| Capply of machtype
| Cextcall of string * machtype * bool * label option
| Cload of memory_chunk * Asttypes.mutable_flag
| Calloc
| Cstore of memory_chunk * Lambda.initialization_or_assignment
| Caddi
| Csubi
| Cmuli
| Cmulhi
| Cdivi
| Cmodi
| Cand
| Cor
| Cxor
| Clsl
| Clsr
| Casr
| Ccmpi of integer_comparison
| Caddv
| Cadda
| Ccmpa of integer_comparison
| Cnegf
| Cabsf
| Caddf
| Csubf
| Cmulf
| Cdivf
| Cfloatofint
| Cintoffloat
| Ccmpf of float_comparison
| Craise of raise_kind
| Ccheckbound
and expression =
| Cconst_int of int
| Cconst_natint of nativeint
| Cconst_float of float
| Cconst_symbol of string
| Cconst_pointer of int
| Cconst_natpointer of nativeint
| Cblockheader of nativeint * Debuginfo.t
| Cvar of Ident.t
| Clet of Ident.t * expression * expression
| Cassign of Ident.t * expression
| Ctuple of expression list
| Cop of operation * expression list * Debuginfo.t
| Csequence of expression * expression
| Cifthenelse of expression * expression * expression
| Cswitch of expression * int array * expression array * Debuginfo.t
| Cloop of expression
| Ccatch of rec_flag * (int * Ident.t list * expression) list * expression
| Cexit of int * expression list
| Ctrywith of expression * Ident.t * expression

Not all cmm expressions currently have Debuginfo.t values attached to them. The ones that do are those that are likely to generate code that can fairly robustly be mapped back to a source location. In the future it might be the case that more Debuginfo.t annotations are desirable.

type codegen_option =
| Reduce_code_size
| No_CSE
type fundecl = {
fun_name : string;
fun_args : (Ident.t * machtype) list;
fun_body : expression;
fun_codegen_options : codegen_option list;
fun_dbg : Debuginfo.t;
}
type data_item =
| Cdefine_symbol of string
| Cglobal_symbol of string
| Cint8 of int
| Cint16 of int
| Cint32 of nativeint
| Cint of nativeint
| Csingle of float
| Cdouble of float
| Csymbol_address of string
| Cstring of string
| Cskip of int
| Calign of int
type phrase =
| Cfunction of fundecl
| Cdata of data_item list
val ccatch : (int * Ident.t list * expression * expression) -> expression
val reset : unit -> unit