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

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue May 17 23:28:07 UTC 2016


Either alphabetic or grouped by function would be good.

-- Jon


On 05/17/2016 03:40 PM, Joseph D. Darcy wrote:
>
> On 5/17/2016 3:24 PM, Jonathan Gibbons wrote:
>> 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?
>
> ;-)
>
> IIRC, the original ordering of the set construction matched the 
> ordering of the listing in the corresponding section of the JLS.
>
> The new order resulted from cut-and-pasting the 5 columns of the set 
> construction into 4 columns of cases.
>
> I'd be happy to reorder this more conceptually access (or is it 
> visibility?) modifiers "public", "protected", "private"; flow control 
> "if", "do", "while", ...
>
> -Joe
>
>>
>> -- 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