1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Assign locations and numbers to globals and primitives *)
|
|
|
|
|
2006-05-11 08:50:53 -07:00
|
|
|
open Cmo_format
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
(* Functions for batch linking *)
|
|
|
|
|
|
|
|
val init: unit -> unit
|
|
|
|
val patch_object: string -> (reloc_info * int) list -> unit
|
1995-11-05 09:32:12 -08:00
|
|
|
val require_primitive: string -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
val initial_global_table: unit -> Obj.t array
|
|
|
|
val output_global_map: out_channel -> unit
|
1997-06-13 08:48:53 -07:00
|
|
|
val output_primitive_names: out_channel -> unit
|
|
|
|
val output_primitive_table: out_channel -> unit
|
2004-02-22 07:07:51 -08:00
|
|
|
val data_global_map: unit -> Obj.t
|
|
|
|
val data_primitive_names: unit -> string
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
(* Functions for the toplevel *)
|
|
|
|
|
2002-11-17 08:42:12 -08:00
|
|
|
val init_toplevel: unit -> (string * Digest.t) list
|
1995-05-04 03:15:53 -07:00
|
|
|
val update_global_table: unit -> unit
|
|
|
|
val get_global_value: Ident.t -> Obj.t
|
2011-12-13 09:50:08 -08:00
|
|
|
val is_global_defined: Ident.t -> bool
|
1995-05-04 03:15:53 -07:00
|
|
|
val assign_global_value: Ident.t -> Obj.t -> unit
|
1996-11-29 10:36:42 -08:00
|
|
|
val get_global_position: Ident.t -> int
|
2003-05-26 06:46:06 -07:00
|
|
|
val check_global_initialized: (reloc_info * int) list -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
type global_map
|
|
|
|
|
|
|
|
val current_state: unit -> global_map
|
|
|
|
val restore_state: global_map -> unit
|
1996-09-24 08:45:14 -07:00
|
|
|
val hide_additions: global_map -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
val filter_global_map: (Ident.t -> bool) -> global_map -> global_map
|
|
|
|
|
|
|
|
(* Error report *)
|
|
|
|
|
|
|
|
type error =
|
|
|
|
Undefined_global of string
|
|
|
|
| Unavailable_primitive of string
|
1998-04-14 07:48:34 -07:00
|
|
|
| Wrong_vm of string
|
2003-05-26 06:46:06 -07:00
|
|
|
| Uninitialized_global of string
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
exception Error of error
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
|
|
|
|
|
|
|
val report_error: formatter -> error -> unit
|