diff options
-rw-r--r-- | bytecomp/bytegen.ml | 2 | ||||
-rw-r--r-- | bytecomp/meta.ml | 3 | ||||
-rw-r--r-- | bytecomp/meta.mli | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/bytecomp/bytegen.ml b/bytecomp/bytegen.ml index b412be4df..831f34b7b 100644 --- a/bytecomp/bytegen.ml +++ b/bytecomp/bytegen.ml @@ -480,7 +480,7 @@ let compile_phrase expr = label_counter := 0; lbl_staticfail := 0; sz_staticfail := 0; - let init_code = comp_expr empty_env expr 0 [Kstop] in + let init_code = comp_expr empty_env expr 1 [Kreturn 1] in let fun_code = comp_remainder [] in (init_code, fun_code) diff --git a/bytecomp/meta.ml b/bytecomp/meta.ml index 038ac3526..94a34bbaa 100644 --- a/bytecomp/meta.ml +++ b/bytecomp/meta.ml @@ -16,5 +16,6 @@ external realloc_global_data : int -> unit = "realloc_global" external static_alloc : int -> string = "static_alloc" external static_free : string -> unit = "static_free" external static_resize : string -> int -> string = "static_resize" -external execute_bytecode : string -> int -> Obj.t = "execute_bytecode" +type closure = unit -> Obj.t +external reify_bytecode : string -> int -> closure = "reify_bytecode" external available_primitives : unit -> string array = "available_primitives" diff --git a/bytecomp/meta.mli b/bytecomp/meta.mli index ab4d161ab..677a53b44 100644 --- a/bytecomp/meta.mli +++ b/bytecomp/meta.mli @@ -18,5 +18,6 @@ external realloc_global_data : int -> unit = "realloc_global" external static_alloc : int -> string = "static_alloc" external static_free : string -> unit = "static_free" external static_resize : string -> int -> string = "static_resize" -external execute_bytecode : string -> int -> Obj.t = "execute_bytecode" +type closure = unit -> Obj.t +external reify_bytecode : string -> int -> closure = "reify_bytecode" external available_primitives : unit -> string array = "available_primitives" |