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
|
|
|
(* 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
|
|
|
|
|
1997-05-15 06:25:14 -07:00
|
|
|
val to_file: out_channel -> string -> instruction list -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Arguments:
|
|
|
|
channel on output file
|
|
|
|
name of compilation unit implemented
|
|
|
|
list of instructions to emit *)
|
|
|
|
val to_memory: instruction list -> instruction list ->
|
|
|
|
string * int * (reloc_info * int) list
|
|
|
|
(* Arguments:
|
|
|
|
initialization code (terminated by STOP)
|
|
|
|
function code
|
|
|
|
Results:
|
|
|
|
block of relocatable bytecode
|
|
|
|
size of this block
|
|
|
|
relocation information *)
|
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) *)
|