This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] C++ space optimization: de-cloning con/de/structors


A better solution, it seems to me, is to factor the *tors properly.  The
base ctor is a subroutine of the complete ctor, which is a subroutine of
the (optional) allocating ctor.  The base dtor is a subroutine of the
complete dtor, which is a subroutine of the deleting dtor.  Then it
becomes a question of inlining, rather than cloning.
Yes, this is better.  Again, you have to watch out for variable arguments;
you either need some wacky magic, or you need to not actually be making
subroutine calls.

I actually thought about implementing it this way in GCC, but did not have
sufficient time to experiment with it.

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]