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

(str) JavaLangAccess accessors for new String shapes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
      None

      Description

      Some related work, notably Indify String Concat (JDK-8085796) needs the access to raw String shape. JavaLangAccess is normally used in these cases, but it only has the char[] version now, which invokes the private constructor that shares "chars" array:

            public String newStringUnsafe(char[] chars) {
                 return new String(chars, true);
            }

      That String(char[],boolean) constructor is copying now, defeating the purpose of JavaLangAccess::newStringUnsafe. Therefore, we need to drill a few new holes in JavaLangAccess to aid these cases, admitting the new String shape.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: