Proposed patch for review (JCTree.Tag)
Kumar Srinivasan
kumar.x.srinivasan at oracle.COM
Fri Nov 4 12:59:45 PDT 2011
Vicente,
Thank you for making these changes.
One more nit, while I was looking at your changes for some other reason,
it struck me that the correct usage would be "have()" and "haveNot()"
vs. "has()"
and "hasNot()".
Thanks
Kumar
> Thank you all for your insightful comments!
>
> Vicente
>
>
>
> --- El *mié, 2/11/11, Kumar Srinivasan
> /<kumar.x.srinivasan at oracle.com>/* escribió:
>
>
> De: Kumar Srinivasan <kumar.x.srinivasan at oracle.com>
> Asunto: Re: Proposed patch for review (JCTree.Tag)
> Para: compiler-dev at openjdk.java.net
> Fecha: miércoles, 2 de noviembre, 2011 21:49
>
> Nice work
>
> 2 cents, but is it worthwhile to add a hasNotTag(ASSIGN) or
> noTag(ASSIGN) convenience method ?
> this will eliminate a few negative checks, ex:
>
> Annotate.java.
> -if (args.length() == 1 && !args.head.hasTag(ASSIGN)) {
> +if (args.length() == 1 && args.head.hasNotTag(ASSIGN)) {
>
> Kumar
>
> > I have posted an updated patch from Vicente, available here:
> >
> > http://cr.openjdk.java.net/~jjg/6921494/webrev.01/
> <http://cr.openjdk.java.net/%7Ejjg/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/
> <http://cr.openjdk.java.net/%7Ejjg/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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20111104/df07c84a/attachment.html
More information about the compiler-dev
mailing list