RFR: 8262227: Change SystemDictionary::find() to return an InstanceKlass*.

David Holmes dholmes at openjdk.java.net
Wed Feb 24 23:12:40 UTC 2021


On Wed, 24 Feb 2021 19:32:29 GMT, Harold Seigel <hseigel at openjdk.org> wrote:

> Please review this fix for JDK-8262227.  This fix changes SystemDictionary::find() to return an InstanceKlass* to reduce InstanceKlass casts, it renames find() to find_instance_klass(), removes its unneeded TRAP parameter, and changes its callers as appropriate.
> 
> It also changed the get_java_...() methods, in thread.cpp, to take an InstanceKlass* parameter and removed their now unneeded TRAPS parameter.
> 
> The fix was tested with mach5 tiers 1 and 2 on Linux, Windows, and Mac OS, and tiers 3-5 on Linux x64 (still in progress).
> 
> Thanks to Coleen and David for their helpful suggestions.
> 
> Thanks, Harold

Nice cleanup Harold! I'm more pleased with the TRAPS removal than the actual type change :)

Ref my comment in the bug report I'd overlooked that just because the return type of find changed, it didn't mean you have to change the type of the variable it was assigned to!

Thanks,
David

-------------

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2712


More information about the hotspot-dev mailing list