Random Week

It was a sort of random week, where I did little bits of things
all over. I’m switching projects here, from Eclipse back to gcj, and
this week was a kind of transition period.

I haven’t been hacking gcjx much lately. It’s been sort of hard
to keep my morale up for it. However, Dalibor gave me
some motivation to run Mauve through gcjx. That
found a couple of easily-fixed bugs. I ran the resulting Mauve and it
seemed to do ok — no verification errors, so it looks like code
generation is in good shape for the most part.

A
bunch
of
C++
bootstrap
patches went into GCC recently. This is great news for gcjx since it
means I basically don’t have to do any GCC hacking to hook up gcjx.
So, I spent a little time on this, but not really enough. It does
now compile without error, but it doesn’t link yet.

As I’ve mentioned before, writing a GCC front end is basically
easy now. The documentation situation is still a bit unfortunate
though. I’ll probably write something longer about my experience
writing a front end from scratch once I’m a bit further along gluing
gcjx to the middle end, basically a document showing exactly how easy
it is to write your own compiler nowadays.

I also made
a generics branch
for Classpath this week, and genericized a
pretty good part of the library (as well as added some other stuff
needed for full 1.5 support). Without this code there is really no
way to test all the new language features in gcjx — in Java, unlike
C++, the compiler has some knowledge of the standard class libraries.
For instance gcjx, at present, knows about 34 different classes in the
standard library.

The C++ wisdom is that this sort of dependency is a mistake. That
is probably true for some uses, but this approach does make it easier
to add language features that interact well with the library. For
instance, I don’t think you could add a nice foreach
construct to C++ without this. (You can do it with macros or with
function-like objects, but neither of those is really “nice”.) As it
is, gcjx is littered with needlessly verbose code using STL iterators.

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.