This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Type safe vector API
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ben Elliston <bje at au dot ibm dot com>
- Date: Fri, 25 Jun 2004 09:37:59 +0100
- Subject: Re: Type safe vector API
- Organization: CodeSourcery LLC
- References: <40D980E9.1050801@codesourcery.com> <40DBD1FC.1040503@codesourcery.com>
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