hg: amber/amber: ldc the result of XXX.format invocations if all argumens are constants
vicente.romero at oracle.com
Thu Feb 21 00:27:40 UTC 2019
On 2/20/19 5:24 PM, Jim Laskey wrote:
> 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.
I think you are right, the issue with the default locale is a
show-stopper for this change :( being conservative I think that it is
better to delta-apply it
> — 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