aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorEnrico Tassi2019-05-24 14:11:17 +0200
committerEnrico Tassi2019-05-24 14:11:17 +0200
commit831639deec0ce88fca4ede4756815cf434088ac3 (patch)
treee61b8bbaee62d36519eb6845c1a6d89e31ed1bf6 /stm
parent1c2cfc1fc66416dbd72dc5f1c72b608727195b27 (diff)
parent069a5e5fa201bb60810dd1b8dc8e1492770a5963 (diff)
Merge PR #10201: Remove access to indirect opaques in the kernel
Ack-by: SkySkimmer Reviewed-by: ejgallego Reviewed-by: gares Reviewed-by: maximedenes
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml24
1 files changed, 10 insertions, 14 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index d469994f3f..660dc27211 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -1837,22 +1837,18 @@ end = struct (* {{{ *)
let o = match c.Declarations.const_body with
| Declarations.OpaqueDef o -> o
| _ -> assert false in
- let uc =
- Option.get
- (Opaqueproof.get_constraints (Global.opaque_tables ()) o) in
+ (* No need to delay the computation, the future has been forced by
+ the call to [check_task_aux] above. *)
+ let uc = Opaqueproof.force_constraints Library.indirect_accessor (Global.opaque_tables ()) o in
+ let uc = Univ.hcons_universe_context_set uc in
(* We only manipulate monomorphic terms here. *)
let map (c, ctx) = assert (Univ.AUContext.is_empty ctx); c in
- let pr =
- Future.from_val (map (Option.get (Global.body_of_constant_body c))) in
- let uc =
- Future.chain uc Univ.hcons_universe_context_set in
- let pr = Future.chain pr discharge in
- let pr = Future.chain pr Constr.hcons in
- Future.sink pr;
- let extra = Future.join uc in
- u.(bucket) <- uc;
- p.(bucket) <- pr;
- u, Univ.ContextSet.union cst extra, false
+ let pr = map (Option.get (Global.body_of_constant_body Library.indirect_accessor c)) in
+ let pr = discharge pr in
+ let pr = Constr.hcons pr in
+ u.(bucket) <- Some uc;
+ p.(bucket) <- Some pr;
+ u, Univ.ContextSet.union cst uc, false
let check_task name l i =
match check_task_aux "" name l i with