summaryrefslogtreecommitdiffstats
path: root/byterun/meta.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-05-28 12:41:37 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-05-28 12:41:37 +0000
commit280167a6a65e28caec9ef1af78204aea0b2bc6e4 (patch)
tree555e074fac3b1b4f8a2b506bd3065c6c6c126642 /byterun/meta.c
parent7714c02c6802469aa3edab124086e9dbfcab081e (diff)
fix_code, meta, interp: remplacement de execute_bytecode par reify_bytecode.
lexing: ne plus faire de callbacks, incompatibles avec les threads. autres: rectifications #includes. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@844 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/meta.c')
-rw-r--r--byterun/meta.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/byterun/meta.c b/byterun/meta.c
index 4b1c76644..a2df1572c 100644
--- a/byterun/meta.c
+++ b/byterun/meta.c
@@ -14,6 +14,7 @@
/* Primitives for the toplevel */
#include "alloc.h"
+#include "config.h"
#include "fix_code.h"
#include "interp.h"
#include "major_gc.h"
@@ -30,13 +31,19 @@ value get_global_data(unit) /* ML */
return global_data;
}
-value execute_bytecode(prog, len) /* ML */
+value reify_bytecode(prog, len) /* ML */
value prog, len;
{
-#if defined(BIG_ENDIAN)
+ value clos;
+#ifdef BIG_ENDIAN
fixup_endianness((code_t) prog, (asize_t) Long_val(len));
#endif
- return interprete((code_t) prog, (asize_t) Long_val(len));
+#ifdef THREADED_CODE
+ thread_code((code_t) prog, (asize_t) Long_val(len));
+#endif
+ clos = alloc(1, Closure_tag);
+ Code_val(clos) = (code_t) prog;
+ return clos;
}
value realloc_global(size) /* ML */