RFR 8203381 Replace InstanceKlass::allocate_instance_handle with JavaCalls::construct_new_instance

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Mon May 21 12:08:56 UTC 2018


This change came out nicely.

On 5/18/18 12:36 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8203381
> http://cr.openjdk.java.net/~iklam/jdk11/8203381-construct-new-instance.v01/ 
>
>
> This patch removes a lot of the boilerplate code for allocating a
> Java object and calling its constructor. Hopefully the code is cleaner
> and easier to read.
>
> Also:
>
> Added assert(InstanceKlass::is_initialized(), ...) in case where
> we cannot call JavaCalls::construct_new_instance for thread objects.
>
> Replaced unnecessary SystemDictionary::resolve_or_null() calls with
> SystemDictionary::XXX_klass().

Great, there are a lot of these that should be replaced in various places.

Thanks,
Coleen

>
> Tested with hs-tier[1,2,3,4,5]
>
> Thanks
> - Ioi
>
>
>
>
>



More information about the hotspot-dev mailing list