Archive for the ‘Uncategorized’ Category

Club Dread

I really loved Super Troopers. I suppose I should be embarrassed
by this, but the fact is that I thought it was hilarious and it has
retained its hilarity for me over time. I still laugh out loud
watching it. So, I was eager to see Club Dread, another movie by the
same guys.

It was funny enough, and I did laugh out loud from time to time,
but unfortunately it didn’t live up to the standard of the previous
movie. I enjoyed it but I doubt I’ll be seeing it a second time.

The Latest

It’s been a while since I last wrote here. In the meantime I’ve
been to FOSDEM, a very cool
experience. I met many of the Free Java hackers and had many
interesting conversations. In many ways it felt like I was with “my
people”, something that doesn’t happen too often.

gcjx is coming
along. It can now correctly parse and analyze
java.lang.Object. This is more impressive than it
sounds; in order to do this we must parse and analyze 426 other
classes as well. Yes, the Java class library is that
interconnected.

Yesterday Michael Koch pointed out some more bugs in gcjx though.
A crash, plus the test he tried, on my machine, shows a serious name
lookup bug. Whoops. At the moment I’m sort of fixing bugs with one
hand and writing new code with the other; my laptop has most of a
major change to make the bytecode generator actually compile. So,
we’re pretty close to getting our first .class file.

gcjx news

gcjx now gets much further into analysis of the core class
library. It can analyze 34 classes now. There are still some bugs,
and of course much remains unimplemented. Still, it is going through
a phase where it is very easy to make progress. Last night I added
initial support for the new 1.5 enum feature. In
particular I added parsing and some model objects.

Compiler Update

Today gcjx successfully completed semantic analysis of
Object. This is the first time it has successfully
analyzed any file. Things are coming along quite nicely.

Crossroads Mall

Here in Boulder the ominously-named Crossroads Mall, a place where
one supposes that a modern-day Robert Johnson might well trade in his
soul for a new pair of Nikes, sits like a cancer mid-town. The mall
has hardly seen worse days, even as a cow pasture. There’s one store
remaining and the remainder is sits dark. Lately I’ve come to realize
that there aren’t simply economic reasons for this. No, the town’s
vampire community has long needed a place to rest during the day, and
they’ve outgrown their former accomodations on North Broadway. Plus,
the food is better downtown.

We can only hope that Boulder High is training our own Buffy to
save us. Else we are doomed.

Big Fish

For me this movie was a sentimental and emotional experience,
touching on the themes of the meaning of life, friendship, courage,
communication, etc. The various whimsical fantasy scenes were the
best part overall. In the end this was missing a little something,
hard to say what. I probably won’t watch it again. Still, I
recommend it.

Gcj as JIT

I’ve been talking with Andrew more about using gcj as a JIT. This
seems not only feasible, but attractive, at this point.

First, we can easily hook into libgcj. We simply override
ClassLoader.defineClass to call into our special code.
There we compute a crypto hash of the class and use this to look in a
cache for the corresponding shared library.

If we don’t find the library, we write out and compile the class
file. We do this by adding a special mode to gcj so that it doesn’t
have to load any extra classes. It just compiles exactly what is in
the class file with very little interpretation.

We can make this safe quite easily. First, we do as much
verification as possible in gcj itself. However, we don’t do any
checking of reference types — in fact we can’t do this, since the
compile time environment might be different from the runtime
environment. Instead we have the gcj verifier emit a list of
verification assertions, and then when loading the shared object we
run through this list and check each one. This means that the class
cache is perfectly safe even if we load the class via a strange class
loader.

Gcj JIT Information

I’ve been researching the simplest way to get a JIT for gcj for a
while.

I investigated using either ORP or Kaffe. ORP looked possible,
since it was written to be VM-independent, but difficult due to
mismatches between its exception handling and gcc’s. Kaffe had a
similar problem, with licensing difficulty to boot.

Tonight I looked into Mono’s new “mini” JIT a bit. Aside from the
ugliness of the code, it seems pretty reasonable. It appears to
integrate well with Dwarf-style exception handling. I’d imagine we
could write a libgcj port of it in a couple weeks (of solid time, not
spare time).

I still suspect Andrew’s gcj-as-jit
idea will prove to be the winner. Still, it is worth exploring our
options.

I’ve also got a short document on the requirements for JIT
pluggability. I’ll post that to the Classpath list soon-ish.