RE: JavaMemoryModel: Major yuck! GET/PUTSTATIC prohibitsreordering

From: David Holmes (dholmes@ics.mq.edu.au)
Date: Thu Nov 11 1999 - 23:58:08 EST


> -----Original Message-----
> From: Bill Pugh [mailto:pugh@cs.umd.edu]
> The compiler can't reorder them unless it can prove that the
> results of that reordering are not observable.

Right. In this case access to statics can have observable side-effects due
to class initialisation and so can't be reordered unless the compiler can
establish that there are no such side-effects. This seems a shame for
something that can only happen once in the execution of a system - is it
the price we pay for lazy class initialisation?

David

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:23 EDT