aboutsummaryrefslogtreecommitdiff
path: root/kernel/cemitcodes.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-07-23 11:13:59 +0200
committerGaëtan Gilbert2020-07-23 11:13:59 +0200
commit58df19e952f23ce9376c67f21d09e515a861db0c (patch)
tree8950a7d1a8049a78b00748fd074ab9c5a0c63ddd /kernel/cemitcodes.ml
parentb8962b4d7d4c23c01b03713fcd9a0816edad3f40 (diff)
parent675b23dcf824d8a851881171a5628b239aad2201 (diff)
Merge PR #12679: Remove redundant data from VM case switch.
Reviewed-by: SkySkimmer Ack-by: silene
Diffstat (limited to 'kernel/cemitcodes.ml')
-rw-r--r--kernel/cemitcodes.ml8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/cemitcodes.ml b/kernel/cemitcodes.ml
index 6b4daabf0c..ed475dca7e 100644
--- a/kernel/cemitcodes.ml
+++ b/kernel/cemitcodes.ml
@@ -13,7 +13,6 @@
(* Extension: Arnaud Spiwack (support for native arithmetic), May 2005 *)
open Names
-open Constr
open Vmvalues
open Cbytecodes
open Copcodes
@@ -424,12 +423,11 @@ let subst_strcst s sc =
| Const_float _ -> sc
| Const_ind ind -> let kn,i = ind in Const_ind (subst_mind s kn, i)
+let subst_annot _ (a : annot_switch) = a
+
let subst_reloc s ri =
match ri with
- | Reloc_annot a ->
- let (kn,i) = a.ci.ci_ind in
- let ci = {a.ci with ci_ind = (subst_mind s kn,i)} in
- Reloc_annot {a with ci = ci}
+ | Reloc_annot a -> Reloc_annot (subst_annot s a)
| Reloc_const sc -> Reloc_const (subst_strcst s sc)
| Reloc_getglobal kn -> Reloc_getglobal (subst_constant s kn)
| Reloc_proj_name p -> Reloc_proj_name (subst_proj_repr s p)