hg: amber/amber: ldc the result of XXX.format invocations if all argumens are constants

Jim Laskey james.laskey at oracle.com
Wed Feb 20 22:24:47 UTC 2019


Think these changes are problematic on two fronts.

1. We really shouldn’t be passing portions of the tree to the Intrinsics API. The API should be 100% JCTree ignorant.  If you go this way then you could wrap JCTree.JCMethodInvocation invocation so that it is opaque to the API. My recommendation is you introduce a new return type and process back in javac.

2. It is not sufficient to rely on the default locale to assume a result.The user can change the default locale out from underneath you.  That is, you can only rely on constance for specific format specifiers.

Cheers,

— Jim






> On Feb 20, 2019, at 4:39 PM, vicente.romero at oracle.com wrote:
> 
> Changeset: 07dbd5da612f
> Author:    vromero
> Date:      2019-02-20 15:38 -0500
> URL:       http://hg.openjdk.java.net/amber/amber/rev/07dbd5da612f
> 
> ldc the result of XXX.format invocations if all argumens are constants
> 
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeTag.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/IntrinsicsVisitor.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessor.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/HashProcessor.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/IntrinsicProcessor.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/Intrinsics.java
> 



More information about the amber-dev mailing list