[Nestmates] RFR: 8189163: [Nestmates] Updated invokeInterface selection/resolution rules
tobias.hartmann at oracle.com
Thu Mar 8 11:01:09 UTC 2018
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. 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.
So your changes look correct!
>> Do you have a regression test for that? And if so, does this reproduce without nestmates?
> The test that triggered this was:
> 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.
More information about the valhalla-dev