John R MacMillan wrote:
|> Are there any JITs that save what they do? [...]

I've been told that IBM's JVM for iSeries (AS/400) does this, but I don't know that first-hand.
Discussing the AS/400 is off-topic for this list, but if you have an interest in JIT's or JVM's. you will probably find it worthwhile to learn about the AS/400's unique Java environment.

Briefly, the AS/400 compiles Java Byte Code to native code, but not like any other Java platform.

There is a native "machine code" into which legacy AS/400 programs were compiled.  The modern AS/400 compiles this legacy instruction set to 64-bit RISC instructions (PowerPC G-6, IIRC) in order to execute it.  Java Byte Code, as it turns out, has some significant similarities to this AS/400 instruction code, so performing the same kind of compiliation on Java class files to turn Java Byte Code into 64-bit RISC code follows a pattern that is already part of the natural operation of the system.  Because of this design affinity, the AS/400 can convert Java programs to native program prior to runtime, so they run as native code from the start; code that follows this execution path is never loaded or evaluated by a "Virtual Machine."

The AS/400 does have a JVM, and you can specify situations where it must be used, including "always."

Ideally, you would develop your Java code under -- say -- Linux, and then deploy the production system on the AS/400, where they would be "transformed" to native executables beforehand.  If your application has a static class-file base and doesn't perform any exotic ClassLoader tricks, then you might find that all of your Byte Code will pre-compile, and run as a native executable.

This URL has a description of the process:

    http://publib.boulder.ibm.com/pubs/html/as400/ic2924/info/java/rzaha/devkit.htm

An interesting side-effect of the AS/400 execution is that the Java environment always performs strict verification on class files, whether or not it compiles them, so if you are planning to deploy to an AS/400, you may want to run your Linux JVM with -Xfuture to enforce the strictest class file format checks.

-- Charles
P.S. No, I haven't deployed on an AS/400, but I've had a couple of projects that were intending to at a future date... a date that never arrived :-( .

Reply via email to