Some time ago I took on the task of getting kaffe, the open source Java compiler/interpreter/JIT to work on the A1 with AOS4. Here is a little update on what has happened so far.
Kaffe is a multi-platform distribution, supporting many machines. One of those machines is the 68k Amiga, although the distribution has not been touched since 1998. The kaffe "system" is configured for your hardware/OS, then compiled to produce a running installation. The Amiga configuration had not been touched since 1998, so by the time I got to it early this year, the main source had changed quite a bit and the Amiga build didn't work at all.
Since then I have managed to make the Amiga 68k build work again, even better than before, although part of that is the general improvement in the sophistication of the source. I have submitted my patches to the general source tree (mainly for the 68k Amiga version only).
Currently the Amiga 68k version runs on my 4000/060@50 MHz. Well, when I say 'runs', I don't mean 'run', or even 'walk'. To be truthful, it oozes like the green slime in Marble Madness. The main reason for the slowness is that whether compiling or running a compiled class, the 'system' loads all the gzipped run-time classes, then unzips them, dynamically allocates storage for each class, then copies the class into its new place in memory. As an example, that process takes 26,000 memory allocations just to store the classes into memory. And that's before the source file has even been opened. On my 600 MHz Duron-powered PC, it's a blink of an eye - about a tenth of a second.
On the Amiga, it's a minute or so for the same process - that's not just because the processor runs at a twelfth of the speed, but also because kaffe is running under ixemul, in a Linux emulation mode. So it's bloody slow. However, I have also installed a native 68k version of Linux on the Amiga, and kaffe runs about four times' faster on that OS using the same hardware.
To be fair to the designers of kaffe, that overhead is constant. Once the library has been loaded, it runs pretty fast from then on. Of course, under Linux, the file system is cached, so it doesn't thrash the disc drive the way it does under Amiga OS.
The kaffe development group have recently brought out a new version that loads pre-compiled classes more efficiently, but I haven't tried it yet. Neither have I tried out the JIT VM. I've only used the interpreter so far.
I expect the speed to improve greatly on the A1 under native PPC Linux, and under AOS4.
I have been concentrating recently on getting the "Regression" tests to run. There is a suite of 115 tests, and a test script that runs them all in turn. When first I got the Amiga version to run, only about 87/115 would run without error. After some work over the last month or so, I now have about 105/115 running without fault. Those that still fail, fail for these reasons:
2 fail because the test is for Linux pathnames like "." and "..". The Amiga OS fails these tests.
1 fails because the 68060 FPU has some issues with division of the maximum negative number (0x80000000).
3 fail because of arithmetic errors (in the last place of long numbers).
2 fail tests designed for the Solaris OS (but they pass on 68k Linux).
- and some others.
I'd publish a running version for people to try on their 68k Amigas, but you need the whole GNU GeekGadgets thing, which is a pain in the neck. If anyone has this setup and would like a copy, PM me.
When the A1 arrives, I'll move the distro over to the new hardware and bring it up under PPC Linux. That will probably bring up a whole lot more problems.
Then, when AOS4 is available, it'll be a whole new ball game. I don't want to run ixemul on the new system, but we'll see what support there is going to be for Linux-like programs. There might be some built-in support that improves on the ixemul approach.
Work continues.
tony