2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1995-08-09 08:06:35 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Generation of bytecode for .cmo files *)
|
|
|
|
|
2006-05-11 08:50:53 -07:00
|
|
|
open Cmo_format
|
1995-05-04 03:15:53 -07:00
|
|
|
open Instruct
|
|
|
|
|
2016-06-03 04:21:22 -07:00
|
|
|
val to_file: out_channel -> string -> string ->
|
|
|
|
required_globals:Ident.Set.t -> instruction list -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Arguments:
|
|
|
|
channel on output file
|
|
|
|
name of compilation unit implemented
|
2014-08-22 06:45:02 -07:00
|
|
|
path of cmo file being written
|
2016-06-03 04:21:22 -07:00
|
|
|
required_globals: list of compilation units that must be
|
|
|
|
evaluated before this one
|
1995-05-04 03:15:53 -07:00
|
|
|
list of instructions to emit *)
|
2017-08-12 13:24:41 -07:00
|
|
|
val to_memory:
|
|
|
|
instruction list -> instruction list ->
|
|
|
|
Misc.LongString.t * (reloc_info * int) list * debug_event list
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Arguments:
|
|
|
|
initialization code (terminated by STOP)
|
|
|
|
function code
|
|
|
|
Results:
|
|
|
|
block of relocatable bytecode
|
2015-02-08 06:10:12 -08:00
|
|
|
relocation information
|
|
|
|
debug events *)
|
2003-03-06 07:59:55 -08:00
|
|
|
val to_packed_file:
|
|
|
|
out_channel -> instruction list -> (reloc_info * int) list
|
|
|
|
(* Arguments:
|
|
|
|
channel on output file
|
|
|
|
list of instructions to emit
|
|
|
|
Result:
|
|
|
|
relocation information (reversed) *)
|
2014-05-09 05:01:21 -07:00
|
|
|
|
|
|
|
val reset: unit -> unit
|
2017-05-04 23:18:40 -07:00
|
|
|
|
2017-08-12 13:24:41 -07:00
|
|
|
val marshal_to_channel_with_possibly_32bit_compat :
|
|
|
|
filename:string -> kind:string -> out_channel -> 'a -> unit
|