RFR (S): 8202465: C1: Casts should not be eliminated for interface types
vladimir.x.ivanov at oracle.com
Thu May 3 07:55:58 UTC 2018
Thanks for reviews, John & Tobias!
> Just wondering, should this code be adapted as well?
No, they are unrelated. 8202399 is about disabling PatchALot for
invokespecial interface calls (because patching not supported), while
8202465 is about erroneous elimination of CheckCast node for interface
> On 03.05.2018 08:35, Tobias Hartmann wrote:
>> Hi Vladimir,
>> looks good to me too.
>> Best regards,
>> On 03.05.2018 04:33, Vladimir Ivanov wrote:
>>> Interface casts can't be eliminated when there's no exact type known for the object and its declared
>>> type is interface as well. Verifier doesn't enforce interface types, so there are no guarantees at
>>> runtime that values have interface types as declared in bytecode.
>>> The fix checks that declared type of the object being casted is not an interface before performing
>>> subtype check.
>>> Also, refactored the test to use jasm instead of jcod.
>>> Testing: failing test, hs-precheckin-comp, hs-tier1, hs-tier2
>>> Best regards,
>>> Vladimir Ivanov
More information about the hotspot-compiler-dev