(Notwithstanding that, as other comments have pointed out, JIT vs AOT is at best a gross oversimplification of the difference between Dalvik and ART.)
(Notwithstanding that, as other comments have pointed out, JIT vs AOT is at best a gross oversimplification of the difference between Dalvik and ART.)
The idea of universal VMs go back to UNCOL project (1958).
A few mainframes made use of VMs with some kind of AOT compilation at installation time. The most notorious of it OS/400, still being used.
The first sucessful JIT compilers were designed as part of Smalltalk systems, namely SELF, which JavaScript is a descent of. So of course you hear a lot about it in the context of JavaScript.
Where JIT compilers bring a major win is when compiling dynamic languages.
With strong typed languages, the type of optimization algorithms you can make use of usually win over the limited options JIT compilers have available due to responsiveness limitations.
In the early 80s there was a fad of VM craziness around P-Code virtual machines, which eventually died out when everyone went back to proper compilers.
So this going back to AOT compilation trend, is just the IT circle going around one more time.
That hasn't been an issue on Android so far because those language runtimes would have had to be retooled to generate Dalvik bytecode, and none of them were. (Ruboto, jruby on Android, runs in pure interpreted mode, with a significant performance hit.) But I believe that with Dalvik, it was technically possible. Does ART just close this possibility off?
But you have other problems to solve: How are you going to generate DEX? Generate java bytecode and bring dx to the runtime? Make jruby emit DEX directly?
EDIT: As per the comment below, that is how it's done. You generate Java bytecode and run dx on it.
To the best of my knowledge, there are too projects for generating Dex bytecode directly:
1. dexmaker https://code.google.com/p/dexmaker/ 2. ASMDEX http://asm.ow2.org/asmdex-index.html
A different approach, which I used for Clojure/Android, is to generate JVM bytecode and then use a bundled dx tool to generate Dalvik bytecode from that.