This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Language extensions ?
- From: "Robin Garner" <robin dot garner at iname dot com>
- To: aph at redhat dot com
- Cc: java at gcc dot gnu dot org
- Date: Fri, 28 Mar 2003 00:33:33 -0500
- Subject: Re: Language extensions ?
> > Of course suggestions about alternative ways of achieving my aims
> > gladly accepted !
>
> Will http://www.rtj.org/doc/javax/realtime/RawMemoryAccess.html do what you need?
>
> Andrew.
I guess it could do some of it, but JMTk would require extensive changes which I don't want to have to make. I guess the whole heap would have to be allocated as a set of RawMemoryAccess objects. I'm still left with the problem of unsigned integer comparison.
Sadly, the only way to compare signed integers in an unsigned way is:
boolean GT(int a, int b) {
if( a > 0 && b > 0 || a < 0 && b < 0 )
return a > b;
else
return a < b;
}
and doing this twice per pointer store operation (in a write barrier) would be expensive.
I suppose an alternative extension would be an "unsigned comparison" method that was guaranteed to be inlined.
-- Robin
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup