daniel.smith at oracle.com
Mon Feb 10 18:08:13 UTC 2020
> On Feb 8, 2020, at 10:08 PM, Dan Smith <daniel.smith at oracle.com> wrote:
>> in HotSpot it does something: For a class with a finalizer it registers something
>> somewhere. But that’s precisely irrelevant to inlines.
> Oh, yeah, if we need to make sure that code gets executed (for identity classes), that will affect the design.
In terms of actual code execution, it looks like there's nothing for the Object constructor to do:
flags: (0x0001) ACC_PUBLIC
stack=0, locals=1, args_size=1
line 50: 0
Start Length Slot Name Signature
0 1 0 this Ljava/lang/Object;
If Hotspot wants to do some internal bookkeeping whenever a new instance gets created (either with the 'new' instruction or when, morally, Object.<init> would execute), of course it's free to do so.
So I'm tentatively proposing changing this bytecode to use ACC_ABSTRACT:
flags: (0x0001) ACC_PUBLIC, ACC_ABSTRACT
(How we actually achieve this in src/java.base/share/classes/java/lang/Object.java is TBD.)
More information about the valhalla-spec-observers