Re: [PATCH] c++: optimize specialization of nested class templates

2022-06-10 Thread Jason Merrill via Gcc-patches
On 6/10/22 12:00, Patrick Palka wrote: On Fri, 10 Jun 2022, Patrick Palka wrote: On Thu, 9 Jun 2022, Patrick Palka wrote: On Thu, 9 Jun 2022, Jason Merrill wrote: On 6/8/22 14:21, Patrick Palka wrote: When substituting a class template specialization, tsubst_aggr_type substitutes the TYPE_

Re: [PATCH] c++: optimize specialization of nested class templates

2022-06-10 Thread Patrick Palka via Gcc-patches
On Fri, 10 Jun 2022, Patrick Palka wrote: > On Thu, 9 Jun 2022, Patrick Palka wrote: > > > On Thu, 9 Jun 2022, Jason Merrill wrote: > > > > > On 6/8/22 14:21, Patrick Palka wrote: > > > > When substituting a class template specialization, tsubst_aggr_type > > > > substitutes the TYPE_CONTEXT bef

Re: [PATCH] c++: optimize specialization of nested class templates

2022-06-10 Thread Patrick Palka via Gcc-patches
On Thu, 9 Jun 2022, Patrick Palka wrote: > On Thu, 9 Jun 2022, Jason Merrill wrote: > > > On 6/8/22 14:21, Patrick Palka wrote: > > > When substituting a class template specialization, tsubst_aggr_type > > > substitutes the TYPE_CONTEXT before passing it to lookup_template_class. > > > This appea

Re: [PATCH] c++: optimize specialization of nested class templates

2022-06-09 Thread Patrick Palka via Gcc-patches
On Thu, 9 Jun 2022, Jason Merrill wrote: > On 6/8/22 14:21, Patrick Palka wrote: > > When substituting a class template specialization, tsubst_aggr_type > > substitutes the TYPE_CONTEXT before passing it to lookup_template_class. > > This appears to be unnecessary, however, because the the initial

Re: [PATCH] c++: optimize specialization of nested class templates

2022-06-09 Thread Jason Merrill via Gcc-patches
On 6/8/22 14:21, Patrick Palka wrote: When substituting a class template specialization, tsubst_aggr_type substitutes the TYPE_CONTEXT before passing it to lookup_template_class. This appears to be unnecessary, however, because the the initial value of lookup_template_class's context parameter is

[PATCH] c++: optimize specialization of nested class templates

2022-06-08 Thread Patrick Palka via Gcc-patches
When substituting a class template specialization, tsubst_aggr_type substitutes the TYPE_CONTEXT before passing it to lookup_template_class. This appears to be unnecessary, however, because the the initial value of lookup_template_class's context parameter is unused outside of the IDENTIFIER_NODE c