classpath
[Top][All Lists]
Advanced

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

Re: String/Hashtable boostrapping (again)


From: Brian Jones
Subject: Re: String/Hashtable boostrapping (again)
Date: 15 Jul 2001 22:37:20 -0400
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Patrick Doyle <address@hidden> writes:

> > Try here:
> > 
> > http://www.mail-archive.com/address@hidden/msg01820.html
> 
> Thanks for the pointer.  Its followups are basically pointing out that
> recursive class initialization is well-defined by the JVM spec.
> 
> However, I don't think that's the central issue.  There really is a
> fundamental initialization problem here:
> 
> - Constant pool strings NEED intern().
> - Intern() USES a Hashtable.
> - Instantiating Hashtable NEEDS Hashtable.<clinit> to be executed.
> - Hashtable.<clinit> USES constant pool strings.
> 
> As classpath stands, I can't see any way to do this correctly.  Am I
> missing it?  What is the sequence of events which causes these things to
> be initialized properly?
> 
> Then, assuming there is such a correct sequence, doesn't this code still
> seem somewhat obscure?  Should it be rewritten so as not to rely so
> heavily on Java's precise initialization semantics, just for clarity?

Patrick,

There are at least two VMs using Classpath today (or variation
thereof) and they have managed to resolve this issue in some way.  I
would say yes let's change it so you can avoid this problem with
String and Hashtable, but maybe this same thing happens
elsewhere... and so on.  Maybe you could hash out the mechanics of how
the other VMs handle this on our list if those from SableVM and ORP
would like to contribute information.

Brian
-- 
Brian Jones <address@hidden>



reply via email to

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