aboutsummaryrefslogtreecommitdiff
path: root/engine/eConstr.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-06-09 14:17:25 +0200
committerPierre-Marie Pédrot2020-06-19 15:56:56 +0200
commit9ad3bb77445de870eecf006941779c78531512e5 (patch)
tree23e063fee291070bd6e71566f70cae5f20e59523 /engine/eConstr.ml
parent33e763a441022623621536766ac38c3021dcb65c (diff)
Do not reallocate named_context_val of the pretyping environment.
Instead of costly linear reallocations, we share as much as possible of the prefixes of the various environment subcomponents.
Diffstat (limited to 'engine/eConstr.ml')
-rw-r--r--engine/eConstr.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/eConstr.ml b/engine/eConstr.ml
index ca681e58f8..42c9359ff0 100644
--- a/engine/eConstr.ml
+++ b/engine/eConstr.ml
@@ -733,6 +733,11 @@ let map_rel_context_in_env f env sign =
in
aux env [] (List.rev sign)
+let match_named_context_val :
+ named_context_val -> (named_declaration * lazy_val * named_context_val) option =
+ match unsafe_eq with
+ | Refl -> match_named_context_val
+
let fresh_global ?loc ?rigid ?names env sigma reference =
let (evd,t) = Evd.fresh_global ?loc ?rigid ?names env sigma reference in
evd, t