1 /**************************************************************************/ 2 /* */ 3 /* OCaml */ 4 /* */ 5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ 6 /* */ 7 /* Copyright 1996 Institut National de Recherche en Informatique et */ 8 /* en Automatique. */ 9 /* */ 10 /* All rights reserved. This file is distributed under the terms of */ 11 /* the GNU Lesser General Public License version 2.1, with the */ 12 /* special exception on linking described in the file LICENSE. */ 13 /* */ 14 /**************************************************************************/ 15 16 /* Handling of blocks of bytecode (endianness switch, threading). */ 17 18 #ifndef CAML_FIX_CODE_H 19 #define CAML_FIX_CODE_H 20 21 #ifdef CAML_INTERNALS 22 23 #include "config.h" 24 #include "misc.h" 25 #include "mlvalues.h" 26 27 extern code_t caml_start_code; 28 extern asize_t caml_code_size; 29 extern unsigned char * caml_saved_code; 30 31 void caml_init_code_fragments(void); 32 void caml_load_code (int fd, asize_t len); 33 void caml_fixup_endianness (code_t code, asize_t len); 34 void caml_set_instruction (code_t pos, opcode_t instr); 35 int caml_is_instruction (opcode_t instr1, opcode_t instr2); 36 37 #ifdef THREADED_CODE 38 extern char ** caml_instr_table; 39 extern char * caml_instr_base; 40 void caml_thread_code (code_t code, asize_t len); 41 #endif 42 43 #endif /* CAML_INTERNALS */ 44 45 #endif /* CAML_FIX_CODE_H */ 46