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

Improve PtrQueue index abstraction

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic

      Description

      PtrQueue uses a byte offset to represent the insertion position in the buffer. This is done so that the generated code for insertions doesn't need to include scaling, which is good. Unfortunately, this representation detail was allowed to leak into other parts of the PtrQueue API, so that derived classes and clients need to be aware of it and perform conversions between element-based indexing and byte offsets in various places. Most clients (other than for code generation making use of the representation) should be able to deal with indices and sizes in the natural units of an array of pointers.

        Attachments

          Activity

            People

            Assignee:
            kbarrett Kim Barrett
            Reporter:
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: