hg: amber/amber: ldc the result of XXX.format invocations if all argumens are constants
Remi Forax
forax at univ-mlv.fr
Wed Feb 20 22:39:16 UTC 2019
----- Mail original -----
> De: "Jim Laskey" <james.laskey at oracle.com>
> À: "Vicente Romero" <vicente.romero at oracle.com>
> Cc: "amber-dev" <amber-dev at openjdk.java.net>
> Envoyé: Mercredi 20 Février 2019 23:24:47
> Objet: Re: hg: amber/amber: ldc the result of XXX.format invocations if all argumens are constants
> 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.
and the fact that argument are constant or not should also be computed before calling the intrinsic API.
>
> 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.
the runtime API (the factory class containing the BSM that does a valueOf) should provide a method that recognize such format, no ?
>
> Cheers,
>
> — Jim
Rémi
>
>
>
>
>
>
>> 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