Archive for the ‘Uncategorized’ Category

Back from Santa Fe

We went to Santa Fe this weekend for Elyn’s birthday, some needed
rest, and our annual green chile infusion. Despite a low-level
illness on my part this all went swimmingly. We had an awesome meal
at Pasqual’s.

While there we stayed, as usual, with Mark Galassi. In addition to
his stimulating conversation and extensive library (this time I read
Wodehouse), I find that simply being in his house inspires me to
program. I think it is because he has his Linux desktop sitting there
in the living room, and obviously uses it for Real Work; also he runs
more gnome applets than I knew existed. In this context it is
immediately obvious how useful a cool new UI hack can be.

La Dolce Vita

It is time for The
Conference on World Affairs
again, so Roger Ebert is in town doing
cinema interruptus. I never go to the interruptus parts, since I tire
easily of hearing the same people spout uninteresting comments. But,
I try to always get to the uninterrupted showing; Ebert says some
funny and interesting things and then we get to see a (usually)
interesting film. (Last year was Floating Weeds, and I’ve regretted
several times that I missed it, so this year I made a special effort.)

I hadn’t seen La Dolce Vita in a number of years. It is still as
interesting and bizarre as I found it the first time. A bit on the
long side, if one is allowed to say that about a classic.

As with the last time, I took the movie quite personally,
juxtaposing my own existential crisis with Marcello’s. Neither
Marcello nor, seemingly, anyone he meets is able to resolve their
crisis and find a reason to live. So, they all die, one way or
another, even the big fish who “insists on looking”. The young girl
at the end shouts to him but he is unable to hear, and turns back to
finish his own destruction.

Leaving the auditorium we walked into the darkening evening and
the start of rain. The colors were quite vivid and a surprising
number of moviegoers followed us down the hill on 17th Street.
Talking about the movie in the midst of a small crowd seemed to
prolong the strange atmosphere left by the movie itself, and I started
to wonder whether my solution to my existential questions was not
merely an illusion I constructed, and whether, perhaps, the
meaninglessness and absurdity of life might not, at any moment, crush
me flat.

Somehow I made it home alive.

Sin City

A disturbing mix of violence and sex. Some call it nihilistic,
but I wouldn’t go that far… instead it merely demonstrates the idea
that no good deed goes unpunished. Graphically interesting, though
for completely-made-up movies I much preferred the visuals in Sky
Captain.

gcjx tree generation

As Mark
pointed out
, last week I sent out a gcjx status
note
. I’ve done a lot of gcjx hacking recently, though, and some
of this is now out of date.

In particular, I wrote most of the code for the binary
compatibility ABI, and I made the source-to-tree path robust enough to
compile all of libjava. I also wrote most of the tree-lowering
support for the new 1.5 language features; the only remaining things
are the new metadata (which requires work on libgcj as well), and
switch statements of enum type.

As a simple test, I got this program working when compiled to
native (linked against a prebuilt libgcj, not one made with gcjx yet):

public class q
{
  public static void main(String[] args)
  {
    for (String x : args)
      System.out.println(x);
  }
}

Also, I have patches to get a good part of the build working —
you can build the gcj driver now and get at least
partway into the libjava build.

So, expect another gcjx patch flood soon…

Libc oops

Ulrich almost immediately wrote me to say that my previous blog
entry was wrong and that glibc has had that functionality for quite
some time. I didn’t see anything here, so I went to
glibc
cvsweb
and dug around and found
dlmopen.c,
which seems to do what I want.

Bogus that I didn’t see this before. Now to wire it in to libgcj

First Code

Last night, just in time for FOSDEM, I got working assembly code
out of gcjx for the first time. It was a do-nothing program, of
course, but nevertheless this is a big milestone. In particular this
means that a fair amount of tree lowering works; the driver works;
various lang hooks and interconnects with GCC work; and gcjx can write
out Class objects, vtables, and other forms of metadata.

So, what remains on this front is a long debugging war. Along the
way I’ll need to fix up some details; e.g. the current class format
needs an upgrade to understand the new forms of metadata.

glibc wish

In Java it is possible to use class loaders to define multiple
classes from a given representation of a class — you can just pass
the same bytes around; each class loader essentially has its own
universe of types.

This doesn’t translate too well to gcj at the moment, since
dlopen() doesn’t do what we want when you try to open a
library more than once.

What would be cool (and I’ve heard that Solaris has this) is to be
able to create new “dlopen contexts” that would allow us to load a
given library once per context. Then in libgcj we could simply
associate a context with each class loader, and avoid the nasty hack
we have to do right now.

Jonas

Thanks to the patient help of Andrew Haley, the other day I
finally got to see Jonas
running pre-compiled with gcj. Right now I have a couple of “special”
hacks in my tree to make this work, but today I found out that they
can be blessed as real patches in short order. I’m planning to demo
this at FOSDEM, assuming I finish installing all those packages on my
laptop.

Sometimes I wonder whether these huge J2EE servers are really all
that great. They seem to have an awful lot of code and, maybe, don’t
really provide all that much leverage. Still, it is another N million
lines of code that run on libgcj.

… and that is the point. We’re much better these days about
being able to run existing java code.

gcj

I can tell gcj is being used more, because the rate of new bug
reports has shot up quite steeply. I keep telling myself, this is
good, this is good, this is good…

gcjx

A couple weeks ago I did more gcjx hacking. Now it can mostly
generate Class objects; this means it is quite close to generating
working object code. This will probably get pushed off a bit due to
FOSDEM though.