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

Improve bootstrapping of unary concatenations

XMLWordPrintable

      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

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

              Created:
              Updated:
              Resolved: