On Thu, Jun 19, 2008 at 1:26 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Jens-Michael Hoffmann <[EMAIL PROTECTED]> writes: > >>> No. I've flipped the branch to start compiling the source files in >>> gcc with C++. Unfortunately a number of issues will need to be >>> addressed before all the code will compile in C++. Most of this work >>> can and will be contributed back to mainline gcc as well. >>> >>> I'll send out a note when everything on the branch compiles in C++. >> >> Is there a todo list? I would like to contribute to this branch, how can I >> help? > > Well, one approach would be to compile code on the branch. Where it > fails, fix it so that it compiles. Then, if appropriate, move the > patch back to mainline, test the patch there, and submit it for > mainline. > > The other major TODO is to work out the details of using STL > containers with GC allocated objects. This means teaching gengtype > how to generate code to traverse STL containers, which would then be > used during GC. This is not a task for the faint-hearted. >
One way to avoid having gengtype generate the walks is to have a container base class that implements walking using iterators. Then we can have gcc::vector instead of std::vector, etc. Gengtype would then just have to use this interface when walking container roots, instead of having to generate it's own walking functions for containers. Then again, it's not clear this is worth it, since at some point you will probably want to have a base class for gc'd objects and have the walking function be a member, instead of what gengtype does now, so gengtype will have to learn some stuff anway.