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

Improve bootstrapping of unary concatenations

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 16
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: