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

Improve bootstrapping of unary concatenations

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: core-libs

      Description

      Expressions like "" + foo ends up as a unary concatenation: a makeConcatWithConstants taking only foo as an argument along with a recipe of "\u0001"

      For all primitive types, this can be reduced to handles to the equivalent String.valueOf. For reference types we need a specialized variant of the StringConcatHelper.stringOf(Object) that explicitly creates a new String, to comply with JLS 15.18.1

      This can improve startup and bootstrap overheads of such simple expressions

        Attachments

          Activity

            People

            Assignee:
            redestad Claes Redestad
            Reporter:
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: