From 8fa3c26adb1bc2c0201a61adede278a0e889eef4 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 23 Nov 2017 14:48:05 +0100 Subject: Move the call to the computation of bytecode inside Cemitcodes. This shouldn't matter because the tcode_of_code function is pure, its only effect being allocating a string and filling it with the translated bytecode. --- kernel/csymtable.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'kernel/csymtable.ml') diff --git a/kernel/csymtable.ml b/kernel/csymtable.ml index 38044071f..8022eae7d 100644 --- a/kernel/csymtable.ml +++ b/kernel/csymtable.ml @@ -25,7 +25,6 @@ open Cbytegen module NamedDecl = Context.Named.Declaration module RelDecl = Context.Rel.Declaration -external tcode_of_code : emitcodes -> int -> tcode = "coq_tcode_of_code" external eval_tcode : tcode -> values array -> values = "coq_eval_tcode" (*******************) @@ -210,9 +209,8 @@ and eval_to_patch env (buff,pl,fv) = | Reloc_const sc -> slot_for_str_cst sc | Reloc_getglobal kn -> slot_for_getglobal env kn in - let buff = patch buff pl slots in + let tc = patch buff pl slots in let vm_env = Array.map (slot_for_fv env) fv in - let tc = tcode_of_code buff (length buff) in eval_tcode tc vm_env and val_of_constr env c = -- cgit v1.2.3