FWIW:
http://code.google.com/p/google-web-toolkit/wiki/BooleanIfExpressionOptimization

http://code.google.com/p/google-web-toolkit/wiki/IfToTernaryExpressionOptimization

Thanks again for banging on these. I've been meaning to do it for ages...

On Wed, Jun 10, 2009 at 9:11 PM, <mmastrac.altern...@gmail.com> wrote:

>
> Reviewers: scottb,
>
> Description:
> As suggested by scottb, we can optimize certain if statements to their
> boolean equivalents, ie:
>
> if (a()) {b()} else {c()}   -> a()?b():c()
>
> if (a()) {b()}  ->  a()&&b()
>
> if (a()) {} else {b()}  -> a()||b()
>
>
>
> Please review this at http://gwt-code-reviews.appspot.com/36801
>
> Affected files:
>   dev/core/src/com/google/gwt/dev/js/JsStaticEval.java
>   dev/core/test/com/google/gwt/dev/js/JsStaticEvalTest.java
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to