Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8306669

Disabling in-lining prevent propagating larval state

XMLWordPrintable

      Please consider following pseudo-code:-

        class abstract_class {}
        value class value_class : public abstract_class {}

        callee: () L<abstract_class>;
               var obj = Unsafe.makePrivateBuffer(value_object);
               return obj;

       caller:
               var return = (value_class)callee();
               Unsafe.putFloat(return, 1.0f);

      Currently C2 compiler always create an InlineType IR to represent a value object. In above case makePrivateBuffer will buffer the InlineType node and set the larval flag of newly created AllocateNode node.

      Lets say callee is not in-lined (or an explicit JVM flag -XX:-Inline is used), return type signature signifies an abstract identity class, an explicit checkcast over return value will create InlineType node. However, newly created IR type may not carry the larval state of actual returned value.

      This may cause problems while processing subsequent Unsafe.put operations.

            Unassigned Unassigned
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: