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 *)
|
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
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $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
|
1997-06-13 08:48:53 -07:00
|
|
|
val output_primitive_names: out_channel -> unit
|
|
|
|
val output_primitive_table: 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
|
1998-04-14 07:48:34 -07:00
|
|
|
| Wrong_vm 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
|