InineTypeNode larval out of sync with non-intrinsic makePrivateBuffer

XMLWordPrintable

      New code model treat values as identity objects with respect to allocation, constructors are no longer factories which used to return a value using areturn bytecode, instead constructor now ends with a return bytecode after applying the desired initializations on incoming un-initialized value.

      Value1 = new MyValue (10, 20); // Immutable
      Value2 = new MyValue(Value1.field, 30) // 1. Update by explicit transition to mutable state using Unsafe.makePrivateBuffer
                                                                                 // 2. Create a new value altogether.

      Latter case breaks down into two steps. New value allocation, which will transition IR to larvae (InlineTypeNode::_larval = true), this will be followed by invokespecial <init> to initialize field values using regular putfield bytecode.

      Thus, a put over value should always receive a value in larval state. Post updates, new inline type node replaces the original value in the JVM state map maintained by SafePointNode.

      Non-intrinsic implementation of makePrivateBuffer returns a j.l.o and is scalarized at subsequent checkcast but recently introduced _is_larval state flat in InlineTypeNode is not getting updated.

            Assignee:
            Jatin Bhateja
            Reporter:
            Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: