Skip to content

Commit

Permalink
Add closure-info field when reifying bytecode (#9681)
Browse files Browse the repository at this point in the history
The closure built by caml_reify_bytecode was not using the new closure format.
  • Loading branch information
sadiqj committed Jun 14, 2020
1 parent 13155d8 commit b8a415f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ CAMLprim value caml_reify_bytecode(value ls_prog,
/* Notify debugger after fragment gets added and reified. */
caml_debugger(CODE_LOADED, Val_long(fragnum));

clos = caml_alloc_small (1, Closure_tag);
clos = caml_alloc_small (2, Closure_tag);
Code_val(clos) = (code_t) prog;
Closinfo_val(clos) = Make_closinfo(0, 2);
bytecode = caml_alloc_small (2, Abstract_tag);
Bytecode_val(bytecode)->prog = prog;
Bytecode_val(bytecode)->len = len;
Expand Down

0 comments on commit b8a415f

Please sign in to comment.