[Nestmates] RFR: 8189163: [Nestmates] Updated invokeInterface selection/resolution rules

David Holmes david.holmes at oracle.com
Thu Mar 8 11:33:21 UTC 2018

On 8/03/2018 9:01 PM, Tobias Hartmann wrote:
> On 08.03.2018 11:00, David Holmes wrote:
>> I don't know how the original dependencies are determined, but if they utilize the itable then the
>> private class method does not appear in the itable with these selection changes and so is not seen.
>> But the is_witness check would see it. The two parts have to use the same basic logic for
>> identifying candidate methods.
> I've just checked again and the original dependencies (during compilation) are determined through
> CHA, which utilizes the same is_witness logic, *and* by some CHA independent quick checks (see
> ciMethod::find_monomorphic_target()). For example, if the method determined by the linkResolver can
> be statically bound (is private), we skip CHA and directly add a dependency.

Ah ha!

> After compilation, we
> use CHA to verify that all dependencies still hold and without your patch the is_witness logic might
> find a private overriding method.

Right. But please don't say "private overriding method" as private 
methods never override anything.

> So your changes look correct!

Great! Thanks for working through this. I was a little uncomfortable not 
knowing exactly why things had changed. But the fact all the existing 
tests passed outweighed that discomfort. :)


>>> Do you have a regression test for that? And if so, does this reproduce without nestmates?
>> The test that triggered this was:
>> compiler/jsr292/methodHandleExceptions/TestAMEnotNPE.java
>> and no it doesn't reproduce outside of nestmates.
> Okay, that makes sense. Just wanted to make sure we don't miss a bug in the mainline.
> Thanks,
> Tobias

More information about the valhalla-dev mailing list