Imagine:
- a LLVM like system in Java
- Java runtime written in Java (like extended version of Jikes RVM)
- a java interpretor written in java
- microkernel based arch (again in Java)
Porting to a new range of hardware requires adding CPU description data in the LLVM like system & kernel. You run an exisiting version, which cross compiles a sub-set of the Java runtime, kernel and all of the interpretor to lowest supported processor and saves off the execuatable. (The runtime needs to be able to cache precompiled code) The system gets copied to the new target, which boots, no full cached runtime, uses interpretor to construct cached binaries of 1,2,4 for the “exact” hardware which it is on. (Of course all of this could be pre-compiled, but this is cooler as well as smaller). Restarts itself. Thus the only portion of the system that cares about the hardware are descriptors in the compiler and kernel frameworks. Yeah, yeah, there lots of gaps in this “fantasy”, but what the heck.