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 */
|
2001-12-07 05:41:02 -08:00
|
|
|
/* under the terms of the GNU Library General Public License, with */
|
|
|
|
/* the special exception on linking described in file ../LICENSE. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1996-11-29 10:36:42 -08:00
|
|
|
/* Handling of blocks of bytecode (endianness switch, threading). */
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2003-12-15 10:10:51 -08:00
|
|
|
#ifndef CAML_FIX_CODE_H
|
|
|
|
#define CAML_FIX_CODE_H
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
|
1996-05-28 05:41:37 -07:00
|
|
|
#include "config.h"
|
1995-05-04 03:15:53 -07:00
|
|
|
#include "misc.h"
|
|
|
|
#include "mlvalues.h"
|
|
|
|
|
2004-01-02 11:23:29 -08:00
|
|
|
extern code_t caml_start_code;
|
|
|
|
extern asize_t caml_code_size;
|
|
|
|
extern unsigned char * caml_saved_code;
|
|
|
|
extern unsigned char caml_code_md5[16];
|
1996-05-28 05:41:37 -07:00
|
|
|
|
2004-01-02 11:23:29 -08:00
|
|
|
void caml_load_code (int fd, asize_t len);
|
|
|
|
void caml_fixup_endianness (code_t code, asize_t len);
|
|
|
|
void caml_set_instruction (code_t pos, opcode_t instr);
|
|
|
|
int caml_is_instruction (opcode_t instr1, opcode_t instr2);
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1997-02-02 06:53:44 -08:00
|
|
|
#ifdef THREADED_CODE
|
2004-01-02 11:23:29 -08:00
|
|
|
extern char ** caml_instr_table;
|
|
|
|
extern char * caml_instr_base;
|
|
|
|
void caml_thread_code (code_t code, asize_t len);
|
1997-02-02 06:53:44 -08:00
|
|
|
#endif
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2003-12-15 10:10:51 -08:00
|
|
|
#endif /* CAML_FIX_CODE_H */
|