JDK 11 RFR of 8202334: Update javax.lang.model.util visitors for 11

joe darcy joe.darcy at oracle.com
Fri Apr 27 00:15:27 UTC 2018


Hi Remi,

On 4/26/2018 11:13 AM, Remi Forax wrote:
> Hi Joe,
> As a side effect, it means that raw string literal will not appear in 11, which is totally fine given a lot of things are still moving.

I wouldn't necessary conclude that. The string literals could be able to 
be supported without changes in the modeling API, which doesn't cover 
method bodies.

Many language changes do not require updates to javax.lang.model. For 
example Project Coin's binary literals and underscores in literals 
didn't lead to any language changes and neither did "var".

>
> I've another question, with my ASM hat becaus we have the same issue with ASM API, how do you plan to introduce preview features in the Visitor API ? As a separate interface, as a normal feature, as something else ?

We've discussed this a bit in the context of JEP 12: Preview Language 
and VM Features.

The JEP currently proposes terminal deprecation for API elements added 
solely to support preview features.

HTH,

-Joe

>
> Rémi
>
> ----- Mail original -----
>> De: "joe darcy" <joe.darcy at oracle.com>
>> À: "compiler-dev" <compiler-dev at openjdk.java.net>
>> Envoyé: Jeudi 26 Avril 2018 19:50:16
>> Objet: JDK 11 RFR of 8202334: Update javax.lang.model.util visitors for 11
>> Hello,
>>
>> Please review the webrev and CSR for 8202334: "Update
>> javax.lang.model.util visitors for 11":
>>
>>      http://cr.openjdk.java.net/~darcy/8202334.0/
>>      https://bugs.openjdk.java.net/browse/JDK-8202335
>>
>>  From the CSR:
>>
>>> The `javax.lang.model` API was added in Java SE 6. In each of Java SE
>>> 7, 8, and 9, new sets of utility visitors were added for each release,
>>> for example starting with `AbstractElementVisitor6`, types
>>> `AbstractElementVisitor7`, `AbstractElementVisitor8`,
>>> `AbstractElementVisitor8` were added in SE 7 and 8, respectively.
>>> Similar patterns were followed for `ElementKindVisitor6`, and the rest
>>> of the utility visitors.
>>>
>>> In Java SE 10, there were no language changes requiring new
>>> operational behavior from the root visitors. Therefore, rather than
>>> introducing yet another slate of visitor classes, the 9-era visitors
>>> were updated to indicate they are appropriate for 10 as well
>>> (CCC-8193194).
>>>
>>> In the absence of language changes in 11 which would require new
>>> operational behavior from the visitors, the 9-era visitors should be
>>> updated to indicate they are appropriate for releases 9 through 11.
>>>
>>> Solution
>>> --------
>>> Update the specification and `SupportedSourceVersion` annotations on
>>> the 9-era visitor classes to indicate they are appropriate for release 11.
>> Thanks,
>>
>> -Joe



More information about the compiler-dev mailing list