1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
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 *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Assign locations and numbers to globals and primitives *)
|
|
|
|
|
|
|
|
open Emitcode
|
|
|
|
|
|
|
|
(* 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
|
1996-11-07 02:56:52 -08:00
|
|
|
val output_primitives: out_channel -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
(* Functions for the toplevel *)
|
|
|
|
|
|
|
|
val init_toplevel: unit -> unit
|
|
|
|
val update_global_table: unit -> unit
|
|
|
|
val get_global_value: Ident.t -> Obj.t
|
|
|
|
val assign_global_value: Ident.t -> Obj.t -> unit
|
1996-11-29 10:36:42 -08:00
|
|
|
val get_global_position: Ident.t -> int
|
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
|
|
|
|
|
|
|
|
exception Error of error
|
|
|
|
|
|
|
|
val report_error: error -> unit
|