classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrap sequence and core classes


From: Brian Jones
Subject: Re: Bootstrap sequence and core classes
Date: 05 Oct 2002 10:13:36 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Mark Wielaard <address@hidden> 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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]