Quote:
"JIT compilers are a novel idea: take some code in an “intermediate form”, and, given some heuristics, compile it into a “more native” representation,"
Note: They write "more native" representation.
Quote:
"Conversely, in JRuby, the source format is the JRuby AST, and the destination format is Java bytecode. Perhaps the most fascinating aspect of the JRuby JIT compiler is that it benefits from both the initial compilation into Java bytecode, and then later, when Java may attempt to translate the JRuby-generated bytecode into native machine instructions."
So the JRuby guys have a multi-staged JIT:
JRuby AST => Java Bytecode => native
Depending on how the program is executed at runtime some parts of it will stay in JRuby AST, more interesting parts of the code will be transformed to Java Bytecode and the Hotspots may end up as native code.
Quote: "JIT compilers are a novel idea: take some code in an “intermediate form”, and, given some heuristics, compile it into a “more native” representation,"
Note: They write "more native" representation.
Quote: "Conversely, in JRuby, the source format is the JRuby AST, and the destination format is Java bytecode. Perhaps the most fascinating aspect of the JRuby JIT compiler is that it benefits from both the initial compilation into Java bytecode, and then later, when Java may attempt to translate the JRuby-generated bytecode into native machine instructions."
So the JRuby guys have a multi-staged JIT:
JRuby AST => Java Bytecode => native
Depending on how the program is executed at runtime some parts of it will stay in JRuby AST, more interesting parts of the code will be transformed to Java Bytecode and the Hotspots may end up as native code.