diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-11-23 14:48:05 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2018-02-14 16:16:12 +0100 |
commit | 8fa3c26adb1bc2c0201a61adede278a0e889eef4 (patch) | |
tree | d0763354c3b05da2e80780d057af068beb3be539 /kernel/csymtable.ml | |
parent | 8cd6ddb98c12b6aba002781158180ffb68aba02f (diff) |
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.
Diffstat (limited to 'kernel/csymtable.ml')
-rw-r--r-- | kernel/csymtable.ml | 4 |
1 files changed, 1 insertions, 3 deletions
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 = |