RFR: 8242452: During module definition, move conversion of packages from native to VM

Claes Redestad claes.redestad at oracle.com
Thu Apr 16 19:46:23 UTC 2020


my intent has been to not remove any checks in the VM endpoints that
were there previously. Some of the package == NULL checks might not be
as immediately apparent, but they should all be there (and checked for
by pre-existing tests such as runtime/modules/JVMAddModuleExports.java)


On 2020-04-16 13:17, Alan Bateman wrote:
> On 16/04/2020 00:04, Ioi Lam wrote:
>> Hi Claes,
>> This is very good optimization. I have a few nit picks:
>> [1] I think the following is unnecessary. The original 
>> Java_java_lang_Module_defineModule0 and GetInternalPackageName 
>> function did not perform null check or type check. I think this should 
>> be changed to an assert.
> It would be a bug if these JVM_XXX functions were called with null or 
> otherwise invalid values. So additional checks shouldn't be needed, they 
> would be just a safety net. That said, I thought the white box tests 
> covered these cases so that the JVM functions could be tested with junk 
> input to make sure that they were robust.
> -Alan

More information about the hotspot-runtime-dev mailing list