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

[lworld] Explore an implementation where the reference projection and value projection types are backed by a single class symbol

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      The proposed solution for JDK-8237072 uses two class symbols to
      back/model the V.ref and V.val projection types.

      This was chosen because some of the state that (naturally) today belong in the class symbol abstraction needs to be distinct between the two projections. (name, flags, type ...)

      Also various parts of javac code compare tsyms and assume the types are same if they are same (on the non-parameterized type path)

      This ticket is to explore whether it would lead to a simpler implementation if we model them as one class and two projection types (a la one generic class and as many as needed parameterized types)

      The upside of that approach is clear: We don't have to go to the trouble of maintaining the symbols in sync. It also aligns with the pedantic model of an inline class giving rise to two projection types. Having two classes is something of a distortion of that model and may have some impact in future that is unknowable now.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sadayapalam Srikanth Adayapalam
              Reporter:
              sadayapalam Srikanth Adayapalam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: