From 8cd6ddb98c12b6aba002781158180ffb68aba02f Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 23 Nov 2017 14:28:21 +0100 Subject: Abstract further the type of VM bytecode compilation. This reduces the possibility to wreak havoc while making the API nicer. --- kernel/cemitcodes.mli | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'kernel/cemitcodes.mli') diff --git a/kernel/cemitcodes.mli b/kernel/cemitcodes.mli index fee45aafd8..a2ff2d3019 100644 --- a/kernel/cemitcodes.mli +++ b/kernel/cemitcodes.mli @@ -6,18 +6,14 @@ type reloc_info = | Reloc_const of structured_constant | Reloc_getglobal of Constant.t -type patch = reloc_info * int - -(* A virer *) -val subst_patch : Mod_subst.substitution -> patch -> patch - +type patches type emitcodes val length : emitcodes -> int -val patch_int : emitcodes -> ((*pos*)int * int) list -> emitcodes +val patch : emitcodes -> patches -> (reloc_info -> int) -> emitcodes -type to_patch = emitcodes * (patch list) * fv +type to_patch = emitcodes * patches * fv val subst_to_patch : Mod_subst.substitution -> to_patch -> to_patch -- cgit v1.2.3