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

Improve PtrQueue index abstraction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • hotspot
    • gc
    • b21
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: