Well, it’s taken a month and a half — and over 2000 lines of code — but I finally got a method out of Shark.
I made a chart showing which bytecodes are implemented, which I’ll keep updated as I progress. The estimated total coverage of 18% is slightly fanciful as it treats all bytecodes as equally complex, with nop
having the same weight as new
for example. Some codes are marked as complete but untested too. The way the compiler is structured means that in simple cases I can copy and paste whole blocks of bytecodes from the server compiler, so where I was doing one bytecode in a block I’ve copied the lot across. Most of them ought to be fine, but a couple are dubious. I’m still shuffling things around to try and make things less so.
Onwards…
Congrats! I look forward to the day when there’s something to port to my Mac :-D
ppc or intel?
PowerPC; I have an old eMac running Leopard and I would love to get Java 6/SoyLatte up and running on it. It seems you’re my only hope ;) Not to be demanding or anything, but how long do you think this effort will take? A year? Less, perhaps?
(By the way, your blog has a fairly short limit on names; too short for my full name at least…)
What is your full name?
SoyLatte… I never looked at it so I can’t say. I guess the stuff in
ports/hotspot/src/cpu
should work but some stuff fromports/hotspot/src/os_cpu
will need importing/writing. Check out the old porting guide I wrote about the original, ppc-specific port. It’s kind of outdated now we’re using zero, but it should give you some idea of where to start.It’s Dan Villiom Podlaski Christiansen; long perhaps, but it’s mine and I’m fairly sure it’s unique :-)
To the point: SoyLatte is a port of the FreeBSD port of Java to Mac OS X. Unfortunately, it hasn’t migrated to OpenJDK yet, and is currently licenced under the Java Research Licence. That’ll be worked out eventually, though, so it shouldn’t matter now. Being based on the Sun sources, there’s no PowerPC support in sight. Perhaps you already knew that, though.
I was actually wondering how far along you think you are; if a port of the JDK for Mac OS X is available one place, and a PowerPC port another, integrating the two should be something within my reach, whereas a full architecture port is out of my league. (I’m a meager student, for what it’s worth…)
It seems that there aren’t many alternatives to your work; the only other open source Java JIT I could find was CACAO, and it appears incomplete compared to the proper JDK; for instance, it uses the Boehm GC. So my question is, how long do you think it’ll take before Shark reaches some port of dogfood-level? Would porting it to Darwin/Mac OS X already make sense now?
You could start integrating the two now if you wanted — IcedTea already works on ppc, via the zero port. Shark is essentially a JIT for the zero port.
Thanks for responding :)
Could you perhaps point me to a repository for your work? I’ve been looking through the IcedTea repository, but I didn’t find anything related to LLVM…
Zero (the interpreter) is in http://icedtea.classpath.org/hg/icedtea6.
Shark (the JIT) isn’t released yet, I’m still working out the basics for it.