Silly Sailor's Bytecode Translator (SSBT)Hugg's Projects

Latest version is 1e-10

In February 2000 I got this wild idea to create a Java --> native code translator. I was sick of Java's lousy speed and set out to make it right. There were projects like GJC out then, but they weren't really up to snuff yet. So I started this mad project. I did it for about a month and then it fizzled.

Why did it fizzle? Well, Hotspot is plenty fast, and there are other, mature, commercial offerings out there written by crazy long-bearded fellows (all compiler guys have to have really long beards -- just like mathematicians).

So what we are left with is an experimental Java to C++ converter, that almost compiles javac, does not support AWT or anything funky like that, and doesn't do GC. Use at your own peril, and don't expect to do anything serious with it.

I started calling it fastj, but there is now a product with the same name, so let's call it Silly Sailor's Bytecode Translator (SSBT). Why not?

My goal was aggressive optimization. I wanted to perform was is now known as escape analysis (that'll be 50 cents, please) -- it amounts to finding out which objects can be allocated on the stack and then freed when the method exits.

I decided my target language would be C++. I started with a Java --> C translator but class inheritance was just too ugly. One of the goals was to make C++ classes that are ugly on the inside, but perfectly approachable from the outside. I used C++'s native exception handling routines, which seemed to work out OK.

Garbage collector? Well, there's boehm-gc, but that's, ummm... we won't talk about that now :) GC is tough.

I used the LGPL'ed classpath library as my open source Java-compatible runtime library. I unfortunately had to hack it a little bit because I'm lazy, so I've included the distro that I used in this archive, under "fastjlib".

I also used the JavaClass library to introspect class bytecode. I hacked that a bit too, so it is also included here.

The only thing I didn't hack was gnu.regexp, which you'll need to download to compile JavaClass.

Be careful!

Downloads

SSBT-1e-10.tar.gz (1124019 bytes) - My, you are brave. You'll need JDK 1.2, UNIX, and a lot of patience to use this. Are you sure you want to download it?

Instructions:

  1. Look at the README.txt and INSTALL.txt files.
  2. Wonder why you're bothering with this.

Links

Web Pages Related to Compiling the Java Programming Language - Good discussion of various native code compilers.
Excelsior JET - What looks to be a good Win32-based native code compiler.


Steven E. Hugg / email