Proposed patch for review (JCTree.Tag)

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Nov 2 13:24:33 PDT 2011


I have posted an updated patch from Vicente, available here:

http://cr.openjdk.java.net/~jjg/6921494/webrev.01/

-- Jon

On 10/24/2011 02:39 AM, Maurizio Cimadamore wrote:
> On 24/10/11 06:25, Jonathan Gibbons wrote:
>> I've posted a patch from our newest contributor, Vicente Zaldivar.
>> The patch is a cleanup to the JCTree.tag values, to use enums
>> instead of small integers.
>>
>> You can see the patch here:
>> http://cr.openjdk.java.net/~jjg/6921494/webrev.00/
>>
>> Thanks to Vicente for the contribution. Review feedback here or
>> to Vicente, please.
>>
>> -- Jon
> Great work - couple of comments below:
>
> *) JCTree - I would add an import static as follows:
>
> import static com.sun.tools.javac.tree.JCTree.Tag.*
>
> This way you will get rid of all the qualified identifier (i.e. most 
> of the code in JCTree should go back to its original form).
>
> The same applies to all files (I listed the files where there is at 
> least more than a single qualified ident):
>
> -) Annotate.java
> -) Attr.java
> -) Check.java
> -) Flow.java
> -) Lower.java
> -) MemberEnter.java
> -) Resolve.java (a non-static import of JCTree.Tag would do fine)
> -) Gen.java
> -) JavacElements.java
> -) JavacParser.java
> -) Pretty.java
> -) TreeInfo.java
> -) TreeMaker.java (a non-static import of JCTree.Tag would do fine)
> -) ClassDocImpl.java
>
> Maurizio




More information about the compiler-dev mailing list