RFR: 8267807: C2: Downcast receiver to target holder during inlining

Vladimir Ivanov vlivanov at openjdk.java.net
Wed May 26 18:10:33 UTC 2021


Virtual method calls involve an implicit subtype check against callee holder. 
But if receiver type is too broad, it has to be narrowed before parsing the callee method.
Otherwise, it may cause problems during parsing and currently it simply blocks inlining. 

Proposed fix implements the narrowing step and re-enables inlining.

Testing:
- [x] hs-tier1 - hs-tier9

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

Commit messages:
 - Validate receiver type against target method

Changes: https://git.openjdk.java.net/jdk/pull/4212/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4212&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267807
  Stats: 86 lines in 2 files changed: 43 ins; 18 del; 25 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4212.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4212/head:pull/4212

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


More information about the hotspot-compiler-dev mailing list