RFR (S) 8031818: Experimental VM flag for enforcing safe object construction

Doug Lea dl at cs.oswego.edu
Sat Feb 1 08:53:50 PST 2014

On 01/31/2014 07:10 PM, John Rose wrote:
> Yes, that is right.  I think of @Stable as a postponed (post-constructor) final,
> but making that real will require a write barrier.

I think it is safe to say that revised JMM9 rules will be simple and clear
about how and when to do this...

> Currently, @Stable is only about "sticky" reads.  I.e., if you read a non-null
> value, you can stick with it, as long as you like.

... but may say very little about this part. The JMM per se cannot tell
you if/when a final write occurs, either for "final" or @Stable (or
for any other variable for that matter). When you can somehow tell
by other means, you don't need much from the JMM to know that you
can suppress reloads, etc.


More information about the hotspot-compiler-dev mailing list