1. Overview
  2. Docs
Module type
Class type

bind name arg fn is equivalent to let name = arg in fn name, or simply fn arg if arg is simple enough

val bind_load : string -> Cmm.expression -> (Cmm.expression -> Cmm.expression) -> Cmm.expression

Same as bind, but also treats loads from a variable as simple

val bind_nonvar : string -> Cmm.expression -> (Cmm.expression -> Cmm.expression) -> Cmm.expression

Same as bind, but does not treat variables as simple


val caml_black : nativeint

A null header with GC bits set to black

val floatarray_tag : Debuginfo.t -> Cmm.expression

A constant equal to the tag for float arrays

val block_header : int -> int -> nativeint

block_header tag size creates a header with tag tag for a block of size size

val black_block_header : int -> int -> nativeint

Same as block_header, but with GC bits set to black

val white_closure_header : int -> nativeint

Closure headers of the given size

val black_closure_header : int -> nativeint
val infix_header : int -> nativeint

Infix header at the given offset

val float_header : nativeint

Header for a boxed float value

val floatarray_header : int -> nativeint

Header for an unboxed float array of the given size

val string_header : int -> nativeint

Header for a string (or bytes) of the given length

val boxedint32_header : nativeint

Boxed integer headers

val boxedint64_header : nativeint
val boxedintnat_header : nativeint
val alloc_float_header : Debuginfo.t -> Cmm.expression


val alloc_floatarray_header : int -> Debuginfo.t -> Cmm.expression
val alloc_closure_header : int -> Debuginfo.t -> Cmm.expression
val alloc_infix_header : int -> Debuginfo.t -> Cmm.expression
val alloc_boxedint32_header : Debuginfo.t -> Cmm.expression
val alloc_boxedint64_header : Debuginfo.t -> Cmm.expression
val alloc_boxedintnat_header : Debuginfo.t -> Cmm.expression


val max_repr_int : int

Minimal/maximal OCaml integer values whose backend representation fits in a regular OCaml integer

val min_repr_int : int
val int_const : Debuginfo.t -> int -> Cmm.expression

Make an integer constant from the given integer (tags the integer)

val cint_const : int -> Cmm.data_item
val targetint_const : int -> Targetint.t
val natint_const_untagged : Debuginfo.t -> Nativeint.t -> Cmm.expression

Make a Cmm constant holding the given nativeint value. Uses Cconst_int instead of Cconst_nativeint when possible to preserve peephole optimisations.

val add_const : Cmm.expression -> int -> Debuginfo.t -> Cmm.expression

Add an integer to the given expression

Increment/decrement of integers

val ignore_low_bit_int : Cmm.expression -> Cmm.expression

Simplify the given expression knowing its last bit will be irrelevant

val ignore_high_bit_int : Cmm.expression -> Cmm.expression

Simplify the given expression knowing its first bit will be irrelevant

Arithmetical operations on integers

Integer tagging. tag_int x = (x lsl 1) + 1

Integer untagging. untag_int x = (x asr 1)

Specific division operations for boxed integers

val mk_if_then_else : Debuginfo.t