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: Type safe vector API


Mark Mitchell wrote:

I've been waiting to see if someone else would comment.

To me, this looks fine. I'm a little nervous about the way in which you're using the API for CLASSTYPE_VBASECLASSES in that it looks like you're conservatively estimating the size of the vector, so it might not actually be a win over the TREE_LIST thing we have now. As you say, however, this is a tiny amount of memory one way or the other.
I figured that the *practical* worst case would be a factor of two
(inherit two non-virtual bases both of which share some vbase heirarchy).
In that case we're still a win over the TREE_LIST, which was 5 times
bigger than necessary.

You need comments on some of the functions; for example, macro_input.
'k.

If nobody objects in another 24 hours, please go ahead and check this in. Hopefully the tree-ssa folks can make use of this for their purposes as well.
I know one is :) I need to add an example use in vec.h

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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