[lworld] Add ValuePayload abstraction

XMLWordPrintable

      Create a wrapper class which represents the payload of an InlineKlass object.

      The current convention is to use a `void*` representing where the payload starts, the `InlineKlass*` (as we do not always have a header when flattened) and a `LayoutKind` (describing the payloads layout).

      I suggest we introduce something like a `ValuePayload` which encapsulate these properties. As well as a hierarchy built upon these, with the proper interfaces implemented.
      * ValuePayload (Any payload)
        * RawValuePayload (Payload with holder erased)
        * BufferedValuePayload (Payload of normal heap object)
        * FlatValuePayload (Payload of flattened value)
          * FlatFieldPayload (Payload of flattened field)
          * FlatArrayPayload (Payload of flattened array element)
         
      The goal is to both make interfaces clearer, and easier to understand. As well as consolidating the implementation in one place rather than spread across different subsystems.

      Each type (except RawValuePayload) also allows for the creation of a Handle, (thread local, or in an OopStorage) for keeping the payload as a thread or global root.

      The ValuePayload class is also the interface for interacting with the Access API for InlineKlass objects.

            Assignee:
            Axel Boldt-Christmas
            Reporter:
            Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: