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

[lworld] Unsafe API on raw pointers vs indirect inline values


    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:


      Unsafe xxxReference APIs are designed for indirect non-inline references operating on raw pointers. Inline values can be passed as values when flattened and can be passed as reference when it is an object of an indirect inline type or a non-flattened inline value.

      Consider the following Unsafe support:

      0. flattened inline values
      In lworld, xxxValue APIs are added for flattened inline values and they take an inline type argument to represent the layout of the flattened inline values

      1. non-nullable inline type vs nullable inline type.
      xxxReference may be called to operate on a reference of an inline type and it should return a default inline value for non-nullable inline type

      2. reference of indirect inline type or non-flattened inline values
      xxxReference may be called to operate on a reference of an inline type which has no identity. Raw pointer comparison applies for non-inline type only whereas equality on objects of inline type should do substitutability check (i.e. acmp).

      Existing Unsafe xxxReference primitives operates on raw pointers. Perhaps adding a new set of Unsafe API for non-flattened inline values.




            • Assignee:
              mchung Mandy Chung
              mchung Mandy Chung
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: