This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposed Change to gnu/gcj/runtime/StackTrace.java


Hello Andrew,

On Sun, 2003-03-16 at 02:40, Andrew Haley wrote:

>  > Does this make sense? 
> 
> It does.  Now I'm trying to think of a way to do this with no overhead -- 
> the run time speed of this method is important.
> 
> I'm thinking of a native method that does 
> 
>     table[h] = key;
> 
> with no checking.  So we could have two private native methods that do
> an array assignment, one with the check and one without.  Or maybe we
> could find some way to make the compiler not emit the _Jv_CheckMemRef
> when it's compiling some code.

Yes, one way could be to add a put_ method to the IdentityHashMap  that
actually relies on a native implementation of table[h] = key, so to
avoid the checking. 

Moreover we can declare the method put_ with package access rights and
take advantage of the fact that for CNI package access level maps to
C++ public. This, would allow us to access the method put_ from
natStactTrace, but would not expose this method to regular users.

Cheers, 
   Angelo 



-- 
Angelo Corsaro
Department of Computer Science
Washington University
One Brookings Drive, Box 1045
St. Louis, MO 63130
http://www.cs.wustl.edu/~corsaro




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]