RFR 8223582 [lworld] WeakReference of an inline type should throw

Roger Riggs Roger.Riggs at oracle.com
Thu May 23 19:52:26 UTC 2019


Please review this change (for LW2) to disallow inline values from being 
referenced by
FinalReference, WeakReference, SoftReference, and PhantomReferences.
Since by definition there cannot be another reference to the value, the 
Reference would be cleared.
Throwing an exception on construction of the ref will prevent an 
accident dependency
on otherwise undefined behavior.
There are further notes in the issue.

Issue:
   https://bugs.openjdk.java.net/browse/JDK-8223582

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-weakinline-8223582-2/index.html

Thanks, Roger




More information about the valhalla-dev mailing list