package obytelib

  1. Overview
  2. Docs
type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type structured_constant =
  1. | Const_base of constant
  2. | Const_pointer of int
  3. | Const_block of int * structured_constant list
  4. | Const_float_array of string list
  5. | Const_immstring of string
type reloc_info =
  1. | Reloc_literal of structured_constant
  2. | Reloc_getglobal of Ident.t
  3. | Reloc_setglobal of Ident.t
  4. | Reloc_primitive of string
type compilation_unit = {
  1. cu_name : string;
  2. mutable cu_pos : int;
  3. cu_codesize : int;
  4. cu_reloc : (reloc_info * int) list;
  5. cu_imports : (string * Digest.t option) list;
  6. cu_required_globals : Ident.t list;
  7. cu_primitives : string list;
  8. mutable cu_debug : int;
  9. cu_debugsize : int;
}
type t = {
  1. version : Version.t;
  2. unit : compilation_unit;
  3. code : Code.t;
}
val print : out_channel -> t -> unit
val read : string -> t
val write : string -> t -> unit
val reloc : t -> Data.t * Symb.t * Prim.t * Code.t