diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2015-09-10 11:47:21 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2015-09-10 11:49:43 +0200 |
commit | f03aaf12eb7d89fa4caa59873e114c8cd125b950 (patch) | |
tree | 444d1b9143a8878f9b0f4e4be02dd06c81f81103 /kernel/environ.ml | |
parent | 952cd3e53d630120dc1319c93421fe2708252b54 (diff) |
Assertion checking that invariant enforced by 0f8d1b92 always holds.
When reifying a 31-bit integer after a VM computation, we check that no bit
outside the 31 LSB is set to 1.
Diffstat (limited to 'kernel/environ.ml')
-rw-r--r-- | kernel/environ.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml index 109e3830c..bf12d6c6d 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -584,7 +584,10 @@ let dispatch = Array.init 31 (fun n -> mkConstruct (digit_ind, nth_digit_plus_one i (30-n))) in - mkApp(mkConstruct(ind, 1), array_of_int tag) + (* We check that no bit above 31 is set to one. This assertion used to + fail in the VM, and led to conversion tests failing at Qed. *) + assert (Int.equal (tag lsr 31) 0); + mkApp(mkConstruct(ind, 1), array_of_int tag) in (* subfunction which dispatches the compiling information of an |