RE: JavaMemoryModel: Major yuck! GET/PUTSTATIC prohibitsreordering

From: David Holmes (
Date: Thu Nov 11 1999 - 23:58:08 EST

> -----Original Message-----
> From: Bill Pugh []
> 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?


JavaMemoryModel mailing list -

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