RFR [lworld] 8239929: Object.newIdentity() replacement for new Object()

John Rose john.r.rose at oracle.com
Fri Feb 28 20:06:59 UTC 2020


On Feb 28, 2020, at 10:21 AM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> 
> BTW, What should happen to the Annotation on new Object: "@HotSpotIntrinsicCandidate'?
> Who decides about that, does it move to the static factory or to the constructor of the implementation
> or is it just unnecessary.

That stays on the protected member.  The JVM needs to process
Object::<init>()V specially as a hook to handle finalization (IIRC).
It’s not a library-level optimization at all, so it shouldn’t move
to the new API point.

— John


More information about the valhalla-dev mailing list