-
Bug
-
Resolution: Fixed
-
P4
-
repo-valhalla
-
generic
-
generic
https://cr.openjdk.java.net/~briangoetz/valhalla/sov/02-object-model.html defines the "ref operator" and "unref operator" as follows:
"It will be useful to define the operator ref v to be a reference to v when v is an inline object, and v itself if it is already an object reference. Then ref is total on all representable values, and always returns a reference. (The opposite operator, unref, is partial, and applies only on references to inline objects, and the two form a projection-embedding pair.)"
As of the implementation forJDK-8237072, ref operator is partial and works only on values. This needs to be amended as it can result in simpler and cleaner code in places.
"It will be useful to define the operator ref v to be a reference to v when v is an inline object, and v itself if it is already an object reference. Then ref is total on all representable values, and always returns a reference. (The opposite operator, unref, is partial, and applies only on references to inline objects, and the two form a projection-embedding pair.)"
As of the implementation for