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


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