RFR: 8290495: Micro-optimize Method::can_be_statically_bound assertions [v2]

Aleksey Shipilev shade at openjdk.org
Tue Jul 19 07:53:59 UTC 2022


On Tue, 19 Jul 2022 07:44:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I'll approve just to avoid spending more cycles on this but I'd hate to see this become common place. :)

True, I am on the fence about fiddling about every `ResourceMark` use. That's why I did the more generic thing in that other PR, so we can slap `ResourceMark`-s pretty much wherever without obsessing about these details. :)

> src/hotspot/share/oops/method.cpp line 811:
> 
>> 809:   if (class_access_flags.is_interface() && (is_nonv != is_static()) && (is_nonv != is_private())) {
>> 810:     ResourceMark rm;
>> 811:     fatal("nonvirtual unexpected for non-static, non-private: %s",
> 
> You could just move the RM and leave the assert as is.

Ok, we can do that.

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

PR: https://git.openjdk.org/jdk/pull/9548


More information about the hotspot-dev mailing list