After thinking a while, the VMI might not be the best way to go for
most of the classes. There seem to be only about 10-20 classes that have
any VM specifics in them. And probably a total of 40 methods. Out of
1000-2000, that's not a bad ratio.
I propose that we write everything except:
Entire classes: java.lang.Class, java.lang.reflect.* (there are
specific optimizations a VM could make that would speed reflect up, and
Class is ... well, you know, it's Class!).
VM-specific native methods in: java.lang.Object, System, Runtime,
ClassLoader, SecurityManager, Thread, ThreadGroup.
We write generic, well-commented skeletons for the VM-specific things
to make them easy to implement by a VM. Then the VM maker writes the
functions and gives us the modified c and h files and the java files and we
put them into a directory for that VM (vm/japhar-1.1/java/lang,
vm/japhar-1.1/java.lang, etc., etc.). Then we put that target into the
Makefile and when someone says, "make Classpath for japhar-1.1," it picks
those up to put into the classes.zip.
How does that sound? Simple enough to work?
--John Keiser