`Reference.get()` is defined as returning the `referent` field of the reference object. But that definition is basically never used, instead being superseded by interpreter (one implementation for each port), C1, and C2 intrinsics. We could eliminate all of the interpreter intrinsic implementations, and perhaps the C1 implementation, by instead providing a native method implementation. This would be similar to what is already done for `Reference.refersTo()` and `Reference.clear()`.
Such a native method implementation is probably slower than the intrinsics, but (1) `Reference.get()` is not generally performance-critical, and (2) we would still keep at least the C2 intrinsic.
Such a native method implementation is probably slower than the intrinsics, but (1) `Reference.get()` is not generally performance-critical, and (2) we would still keep at least the C2 intrinsic.
- links to
-
Review(master) openjdk/jdk/24315