Re: String/Hashtable bootstrapping problem

2001-07-13 Thread John Leuner
> > I have encountered a problem trying to initialize the String and Hashtable > > classes. Here's the problem: > > > > - Hashtable uses String constants like "loadFactor" and "threshold" which > > are initialized in Hashtable.. > > - String constants are supposed to have unique values, as ensu

Re: String/Hashtable bootstrapping problem

2001-07-06 Thread Patrick Doyle
On Sat, 7 Jul 2001, John Leuner wrote: > > I'm talking about these lines from java.util.Hashtable: > > > > // used for serializing instances of this class > > private static final ObjectStreamField[] serialPersistentFields = > > { new ObjectStreamField("loadFactor", float.class), > >

Re: String/Hashtable bootstrapping problem

2001-07-06 Thread John Leuner
> > > I have encountered a problem trying to initialize the String and Hashtable > > > classes. Here's the problem: > > > > > > - Hashtable uses String constants like "loadFactor" and "threshold" which > > > are initialized in Hashtable.. > > > > You are mistaken, these are primitive types (i

Re: String/Hashtable bootstrapping problem

2001-07-06 Thread Etienne M. Gagnon
Hi Patrick. The String/Hashtable problem is, as you identified, a "bootstrapping" problem. It is not at all necessary to make "intern()" a native method, or to eliminate the recursive dependency between Hashtable and String. The solution is to have a special "bootstrapping" mode in your VM.

Re: String/Hashtable bootstrapping problem

2001-07-06 Thread Brian Jones
Patrick Doyle <[EMAIL PROTECTED]> writes: > That sounds reasonable. It makes sense to me that something as > fundamental as String shouldn't depend on other classes for its > initialization, because you get a can of worms if one of those other > classes needs a String for its own initialization.

RE: String/Hashtable bootstrapping problem

2001-07-05 Thread Patrick Doyle
On Thu, 5 Jul 2001, Cierniak, Michal wrote: > In ORP (http://orp.sf.net) we intern all strings in a hash table implemented > in C++, so we don't run in the problem described by you because our ldc > doesn't call any Java code. Ok, thanks for the info. My theory was that it would be best for l

RE: String/Hashtable bootstrapping problem

2001-07-05 Thread Cierniak, Michal
> Ok, if anyone from these projects is reading, I'd like to ask: > > - Do you use the String and Hashtable classes as-is from Classpath? > - If so, how do they get initialized if each needs the other to be > initialized first? In ORP (http://orp.sf.net) we intern all strings in a hash table impl

Re: String/Hashtable bootstrapping problem

2001-07-05 Thread Brendan Macmillan
Hi Patrick, > I'm talking about these lines from java.util.Hashtable: > > // used for serializing instances of this class > private static final ObjectStreamField[] serialPersistentFields = > { new ObjectStreamField("loadFactor", float.class), > new ObjectStreamField("threshold", i

Re: String/Hashtable bootstrapping problem

2001-07-05 Thread Patrick Doyle
On 5 Jul 2001, Brian Jones wrote: > Patrick Doyle <[EMAIL PROTECTED]> writes: > > > Surely all the existing JVMs that use Classpath must cope with this > > somehow? > > SableVM, ORP, and Japhar are examples that apparently work. Ok, if anyone from these projects is reading, I'd like to ask: -

Re: String/Hashtable bootstrapping problem

2001-07-05 Thread Patrick Doyle
On Thu, 5 Jul 2001, John Leuner wrote: > > I have encountered a problem trying to initialize the String and Hashtable > > classes. Here's the problem: > > > > - Hashtable uses String constants like "loadFactor" and "threshold" which > > are initialized in Hashtable.. > > You are mistaken, th

Re: String/Hashtable bootstrapping problem

2001-07-05 Thread John Leuner
> I have encountered a problem trying to initialize the String and Hashtable > classes. Here's the problem: > > - Hashtable uses String constants like "loadFactor" and "threshold" which > are initialized in Hashtable.. You are mistaken, these are primitive types (ints and floats). The names

Re: String/Hashtable bootstrapping problem

2001-07-05 Thread Brian Jones
Patrick Doyle <[EMAIL PROTECTED]> writes: > Surely all the existing JVMs that use Classpath must cope with this > somehow? SableVM, ORP, and Japhar are examples that apparently work. Brian -- Brian Jones <[EMAIL PROTECTED]> ___ Classpath mailing lis

Re: String/Hashtable bootstrapping problem

2001-07-04 Thread Patrick Doyle
On Wed, 4 Jul 2001, Artur Biesiadowski wrote: > Patrick Doyle wrote: > > > Does anyone have any recommendations as to how I should handle this? > > Maybe consider implementing String.intern as native method? I had considered that, but that's not how it's implemented now, and I wasn't sure I wa

Re: String/Hashtable bootstrapping problem

2001-07-04 Thread Artur Biesiadowski
Patrick Doyle wrote: > Does anyone have any recommendations as to how I should handle this? > Perhaps I should not call String.intern if String.internTable is null, > relying on the libraries not to try to use two copies of the same constant > string? Maybe consider implementing String.intern as