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

Remove fork to xxcodeArrayLoop() and xxcodeBufferLoop() in sun.nio.cs coders

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Use same code on heap buffers and direct buffers.
      Snippet of current code:
              protected CoderResult decodeLoop(ByteBuffer src,
                                               CharBuffer dst)
              {
                  if (src.hasArray() && dst.hasArray())
                      return decodeArrayLoop(src, dst);
                  else
                      return decodeBufferLoop(src, dst);
              }

      Since access to heap buffers and direct buffers is now optimized via Unsafe [1], there is no more need to separately optimize the code for heap buffers and direct buffers.
      [1] https://bugs.openjdk.java.net/browse/JDK-8149469

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sherman Xueming Shen
              Reporter:
              ulfzibis Ulf Zibis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: