RFR: 8232613: Move Object.registerNatives into HotSpot
David Holmes
david.holmes at oracle.com
Tue Oct 22 08:58:01 UTC 2019
Hi Andrew,
On 22/10/2019 6:11 pm, Andrew Dinn wrote:
> Hi Claes/David,
>
> On 22/10/2019 00:08, David Holmes wrote:
>> My only nit with this is that I don't think register_native and friends
>> belongs in the SystemDictionary class as it has nothing to do with the
>> SD. This code seems to be all about Methods so that seems like the place
>> to put this.
> Claes, the patch looks good.
>
> David, I'm not clear why you think this is about methods. The calls to
> register_native occur under
>
> SystemDictionary::resolve_well_known_classes
>
> which indicates to me that this code is very much about Classes/klasses
> -- specifically initializing class Object during early bootstrap. The
> fact that it is /methods/ of Object that are being fixed up doesn't
> really change that for me.
Ultimately "registering" a native method is doing:
method->set_native_function(entry,
Method::native_bind_event_is_interesting);
that's the crux of it. Seems pretty specifically about Methods to me.
> So, I would have thought it would be clearer for the code that does this
> specific bit of 'well known class init' to be located with the other
> 'well known class init' code.
I don't see how the call site dictates where the called code should be
located ???
Regards,
David
-----
> regards,
>
>
> Andrew Dinn
> -----------
>
More information about the hotspot-runtime-dev
mailing list