RFR(XS) 8209823 Replace Verifier::load_class with a simple lookup of super classes

Lois Foltan lois.foltan at oracle.com
Tue Aug 28 12:33:21 UTC 2018


Hi Ioi,

Reviewed version v02 of the webrev.  Looks good.  One coding preference 
comment.

classfile/verifier.cpp - line #2313.  I think you could change the break 
statement to a simple return which I would find clearer.  I'm ok with 
whatever you decide however.

Thanks,
Lois

On 8/27/2018 7:02 PM, Ioi Lam wrote:

> https://bugs.openjdk.java.net/browse/JDK-8209823
> 8209823-simplify-verifier-load-class.v01/
>
> Please review this small clean up:
>
> Verifier::load_class(name) is called only when name is known to
> be the name of a super class of the current class. At this point,
> the super class should have already been loaded. Also, the loader
> of the current class should have already recorded the super
> class as a dependency.
>
> Therefore, load_class does a lot of work (such as resolving the
> super class by name) that's not necessary. Also, load_class is
> declared to potentially throw exceptions. This makes code analysis
> more complicated.
>
> The fix is to remove load_class() altogether and change
> ClassVerifier::name_in_supers to also return the super's.
> InstanceKlass*
>
> Thanks
> - Ioi



More information about the hotspot-runtime-dev mailing list