classpath
[Top][All Lists]
Advanced

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

Re: minimal hack to classpath for ORP 1.0.9


From: Eric Blake
Subject: Re: minimal hack to classpath for ORP 1.0.9
Date: Sun, 24 Mar 2002 17:27:25 -0700

Fred Gray wrote:
> 
> I think I've figured out the minimal hack to the current classpath CVS to
> work with ORP 1.0.9 (at least for programs of the complexity of "Hello 
> world").
> Hopefully, this will give the people who understand ORP some ideas on how
> to fix things up properly.
>  
> Issue 1: Calling methods in java.lang.System from the constructor of
> java.lang.Runtime seems to cause a crash.

What is the crash you are getting?  I agree that your hack will prevent
calling java.lang.System, but it limits the library search path to ".",
which is most likely wrong: what if any of the core classes need system
properties during the bootstrap phase, such as for grabbing a locale
resource file?  We already have VMSystem.insertSystemProperties, which
System uses to initialize the default properties.  Would it be worth
moving the default properties from System over to Runtime (the way the
default security manager was moved), and having Runtime use this VM
generated property list directly rather than relying on Runtime?

> 
> Issue 2: Calling clone() on an array in String.getCharArray() causes a
> linking error when the method is compiled.  As an aside, I'm at least a
> little interested in knowing why (char []).clone() is thought to be faster
> than System.arraycopy().

Both arraycopy and clone should be native methods, and both can be
implemented pretty much as a memcpy().  However, arraycopy has to do
bounds and type checking (to make sure you aren't doing something stupid
like arraycopy(int[], -1, float[], 0, 1)), where clone doesn't.  But I
think that this hack is appropriate if it will help ORP, so I will
commit it shortly.

-- 
This signature intentionally left boring.

Eric Blake             address@hidden
  BYU student, free software programmer



reply via email to

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