Language extensions ?

Robin Garner robin.garner@iname.com
Fri Mar 28 05:33:00 GMT 2003


>  > 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



More information about the Java mailing list