diff options
-rw-r--r-- | byterun/interp.c | 15 | ||||
-rw-r--r-- | byterun/interp.h | 5 |
2 files changed, 18 insertions, 2 deletions
diff --git a/byterun/interp.c b/byterun/interp.c index 6c0df8c6d..1dbcaaae2 100644 --- a/byterun/interp.c +++ b/byterun/interp.c @@ -32,6 +32,12 @@ #include "signals.h" #include "stacks.h" +#ifdef __STDC__ +const char caml_interp_ident[] = + "$Id$" + " on " __DATE__ " at " __TIME__ ; +#endif + /* Registers for the abstract machine: pc the code pointer sp the stack pointer (grows downward) @@ -1069,6 +1075,15 @@ value caml_interprete(code_t prog, asize_t prog_size) #endif } +void caml_prepare_bytecode(code_t prog, asize_t prog_size) { + /* other implementations of the interpreter (such as an hypothetical + JIT translator) might want to do something with a bytecode before + running it */ + Assert(prog); + Assert(prog_size>0); + /* actually, the threading of the bytecode might be done here */ +} + void caml_release_bytecode(code_t prog, asize_t prog_size) { /* other implementations of the interpreter (such as an hypothetical JIT translator) might want to know when a bytecode is removed */ diff --git a/byterun/interp.h b/byterun/interp.h index bc0a92040..9eb733940 100644 --- a/byterun/interp.h +++ b/byterun/interp.h @@ -18,14 +18,15 @@ #ifndef CAML_INTERP_H #define CAML_INTERP_H -/* cvs $Id$ */ - #include "misc.h" #include "mlvalues.h" /* interpret a bytecode */ value caml_interprete (code_t prog, asize_t prog_size); +/* tell the runtime that a bytecode program might be needed */ +void caml_prepare_bytecode(code_t prog, asize_t prog_size); + /* tell the runtime that a bytecode program is no more needed */ void caml_release_bytecode(code_t prog, asize_t prog_size); |