JDK 9 RFR of JDK-6415644 Make javax.lang.model.SourceVersion more informative

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue May 17 22:24:52 UTC 2016


OK, I have to ask, what is the ordering of the cases? :-)

In the array in the previous version, they were (mostly) sorted 
alphabetically down
the columns.  ("for" If" "goto" "implements" was a bit anomalous.)
The sort in cases labels is more cryptic, leading me to look for 
acrostics and other
hidden messages to aliens.

Aha, I think I've found the hidden meaning! Who else can spot it?

-- Jon


On 05/17/2016 03:04 PM, Joseph D. Darcy wrote:
> PS And know remembering to include the new link!
>
>     http://cr.openjdk.java.net/~darcy/6415644.1/
>
> -Joe
>
> On 5/17/2016 3:03 PM, Joseph D. Darcy wrote:
>> Hi Jon,
>>
>> On 5/17/2016 2:10 PM, Jonathan Gibbons wrote:
>>> That being said,  the implementation does not appear to give what 
>>> might be considered correct answers to
>>>     isKeyword("assert", SourceVersion.RELEASE0);
>>>     isKeyword("enum", SourceVersion.RELEASE0);
>>>
>>> I can't help feeling that the body of isKeyword is likely to evolve 
>>> into a strings-in-switch ;-)
>>
>> As you wish, including version-sensitive results and tests for 
>> "strictfp", "assert", "enum", etc.
>>
>> Thanks,
>>
>> -Joe
>>
>>
>>>
>>> -- Jon
>>>
>>> On 05/17/2016 01:11 PM, Jonathan Gibbons wrote:
>>>> Looks OK to me.
>>>>
>>>> You could micro-optimize these lines
>>>>
>>>>  318         String id = s.toString();
>>>>  319         if ("_".equals(id)) {
>>>>
>>>> to use .contentEquals and aboid a possibly unnecessary .toString().
>>>>
>>>> -- Jon
>>>>
>>>>
>>>>
>>>> On 05/17/2016 11:48 AM, joe darcy wrote:
>>>>> Hello,
>>>>>
>>>>> Please review this webrev to add some version-sensitive keyword 
>>>>> and name queries:
>>>>>
>>>>>     JDK-6415644 Make javax.lang.model.SourceVersion more informative
>>>>>
>>>>>     http://cr.openjdk.java.net/~darcy/6415644.0/
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -Joe
>>>>>
>>>>
>>>
>>
>



More information about the compiler-dev mailing list