Module OByteLib.Cmofile

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