java aliasing rules

Jeff Sturm jsturm@one-point.com
Thu Apr 4 14:20:00 GMT 2002


On Thu, 4 Apr 2002, Andrew Haley wrote:
> > > Right, its not optimal scheduling, but there's no way to avoid that and 
> > > still have the correct behaviour for NullPointers. And as you suggest, a 
> > > modern processor may be speculativly executing the following loads, so 
> > > it probibly doesn't matter too much.
>> If it doesn't annul such speculation on SEGV I don't think it's
> correct Java semantics.

I've been told that EV6 does, don't know about others. (CPUs are complex
beasts nowadays, that's for sure.)
> > It might be useful to turn this "correctness" off with a compiler option,
> > as we do with -fno-bounds-check. I habitually check for null in my code,
> > and don't do anything useful with a NullPointerException besides aborting.
> > I suspect that's true of a great deal of Java code.
>> I know what you mean, but turning this off is a pretty major departure
> from the Java language spec.

Perhaps. There are days I wonder if Java is the language I need. What
I'd really like is Java that easily binds to C++ code... um, never
mind ;)
Jeff


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /