Re: RFR: 8329948: Remove string template feature [v3]

2024-04-10 Thread Maurizio Cimadamore
> This PR removes support for the string template feature from the Java 
> compiler and the Java SE API, as discussed here:
> 
> https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html

Maurizio Cimadamore has updated the pull request incrementally with one 
additional commit since the last revision:

  Revert StringConcatFactory field to before string template

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/18688/files
  - new: https://git.openjdk.org/jdk/pull/18688/files/da5b32c9..a7396ce0

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=18688=02
 - incr: https://webrevs.openjdk.org/?repo=jdk=18688=01-02

  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/18688.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18688/head:pull/18688

PR: https://git.openjdk.org/jdk/pull/18688


Re: RFR: 8329948: Remove string template feature [v3]

2024-04-10 Thread Maurizio Cimadamore
On Tue, 9 Apr 2024 20:22:34 GMT, Chen Liang  wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Revert StringConcatFactory field to before string template
>
> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 
> 120:
> 
>> 118:  * @since 21
>> 119:  */
>> 120: public static final int MAX_INDY_CONCAT_ARG_SLOTS;
> 
> May this value change in the future? If yes, we might change this to a method 
> to avoid incorrect eager inlining by the java compiler, or drop this with 
> string templates.

Good catch. Since this was tweaked to be a public API as part of the string 
template feature, I've reverted this code to what it was prior to string 
template. That is, now this is a private static final constant, with 
initializer set to 200 (no need to inhibit javac constant folding, since all 
uses are from this file).

> src/java.base/share/classes/jdk/internal/util/OctalDigits.java line 44:
> 
>> 42:  *
>> 43:  * @since 21
>> 44:  */
> 
> Spurious javadoc

fixed, thanks

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18688#discussion_r1559228274
PR Review Comment: https://git.openjdk.org/jdk/pull/18688#discussion_r1559228920