> > 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
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),
> >
> > > 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
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.
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.
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
> 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
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
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:
-
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
> 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
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
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
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
14 matches
Mail list logo