Mark Wielaard <[EMAIL PROTECTED]> writes: > How/Why is it important for VM writers that all this initialization > happens during loading of java.lang.Object? Wouldn't it make more sense > if they happen when those classes are actually used? Would that make > live of the VM writers easier or harder? > > The static code block in Object (<clinit>) is only there because we have > our own JNI implementation of Object.getClass(). But I think that > normally a VM would special case that call anyway so I would like to > move that call to VMObject.
There is always some sequence of things to load in order for the VM to start executing bytecode. It starts with loading the class with main() and continues to super classes, things those use, and eventually hitting Object. The things Object depends on shouldn't make or break a VM, at least by my reading of the JVM specification there is no special casing of Object. Why would we not keep the loadLibrary and the native methods in Object? Brian -- Brian Jones <[EMAIL PROTECTED]> _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

