RFR JDK-8207219: [lworld] C2 should not invoke a method if its signature has inconsistent use of ValueType

Ioi Lam ioi.lam at oracle.com
Sat Jul 14 20:14:36 UTC 2018


This patch prevents improper inlining: when you have programs like this

     class VT { // knows that Point is a ValueType
         void crasher() {

     class NonVT { // does NOT know that Point is a ValueType
         static Point x;
         static void foo() {
             x = bar(); // <-- cannot inline this call into VT.crasher

         static Point bar() {
             return null;

If we inlined the bar() call into VT.crasher, it would break JDK-8206140 
which assumes that a callee will never return a NULL value back to a
compiled caller.

- Ioi

[1] https://bugs.openjdk.java.net/browse/JDK-8206140
     [lworld] Move return value null checks into the callee

More information about the valhalla-dev mailing list