On Wed, Oct 03, 2018 at 07:44:03PM +0200, Jakub Jelinek wrote:
> On Wed, Oct 03, 2018 at 12:30:28PM -0400, Nathan Sidwell wrote:
> > On 10/1/18 7:47 PM, Jason Merrill wrote:
> > > On Mon, Oct 1, 2018 at 6:41 PM Marek Polacek <pola...@redhat.com> wrote:
> > > > 
> > > > This patch implements C++20 explicit(bool), as described in:
> > > > <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0892r2.html>.
> > > > 
> > > > I tried to follow the noexcept specifier implementation where I could, 
> > > > which
> > > > made the non-template parts of this fairly easy.  To make 
> > > > explicit(expr) work
> > > > with dependent expressions, I had to add DECL_EXPLICIT_SPEC to 
> > > > lang_decl_fn,
> > > > which serves as a vessel to get the explicit-specifier to 
> > > > tsubst_function_decl
> > > > where I substitute the dependent arguments.
> > > 
> > > What's the impact of that on memory consumption?  I'm nervous about
> > > adding another word to most functions when it's not useful to most of
> > > them.  For several similar things we've been using hash tables on the
> > > side.
> > 
> > Iain had the same question about coroutine state.  For the moment we're
> > doing the simple thing of growing lang_decl_fn.  It seems the better
> > approach is a flag in the function_decl (or it's decl_lang_specific
> > extension) to say 'go look over there', and a hash table you know will
> > contain something.
> 
> Yeah, that is what is used e.g. for DECL_VALUE_EXPR, DECL_DEBUG_EXPR and
> many other things.

Thanks.  We have 13 spare bits in lang_decl_fn so taking one of them should
be fair game.

I'll rework my patch as per above.

Marek

Reply via email to