From a4839aa1ff076a8938ca182615a93d6afe748860 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 4 Jun 2018 13:32:35 +0200 Subject: 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. --- kernel/declarations.ml | 1 - kernel/indtypes.ml | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'kernel') 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 -- cgit v1.2.3