diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2018-06-04 13:32:35 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2018-06-17 11:44:04 +0200 |
commit | a4839aa1ff076a8938ca182615a93d6afe748860 (patch) | |
tree | 9a68d53f50d7d0411f8950743e915fef78322b35 /kernel | |
parent | 4513b7735779fb440223e6f22079994528249047 (diff) |
Remove the proj_eta field of the kernel.
This field was not used inside the kernel and not used in
performance-critical code where caching is essential, so we extrude
the code that computes it out of the kernel.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/declarations.ml | 1 | ||||
-rw-r--r-- | kernel/indtypes.ml | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/kernel/declarations.ml b/kernel/declarations.ml index 02871153b..abebec156 100644 --- a/kernel/declarations.ml +++ b/kernel/declarations.ml @@ -54,7 +54,6 @@ type projection_body = { proj_npars : int; proj_arg : int; (** Projection index, starting from 0 *) proj_type : types; (* Type under params *) - proj_eta : constr * types; (* Eta-expanded term and type *) proj_body : constr; (* For compatibility with VMs only, the match version *) } diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index 439acd15b..4bc7ea198 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -869,14 +869,10 @@ let compute_projections ((kn, _ as ind), u as indu) n x nparamargs params (* from [params, x:I, field1,..,fieldj |- t(field1,..,fieldj)] to [params, x:I |- t(proj1 x,..,projj x)] *) let ty = substl subst t in - let term = mkProj (Projection.make kn true, mkRel 1) in let fterm = mkProj (Projection.make kn false, mkRel 1) in let compat = compat_body ty (j - 1) in - let etab = it_mkLambda_or_LetIn (mkLambda (x, indty, term)) params in - let etat = it_mkProd_or_LetIn (mkProd (x, indty, ty)) params in let body = { proj_ind = fst ind; proj_npars = nparamargs; - proj_arg = i; proj_type = projty; proj_eta = etab, etat; - proj_body = compat } in + proj_arg = i; proj_type = projty; proj_body = compat } in (i + 1, j + 1, kn :: kns, body :: pbs, fterm :: subst, fterm :: letsubst) | Anonymous -> raise UndefinableExpansion |