[gwt-contrib] Re: Optimize if statements to conditionals and boolean ops if possible

2009-06-11 Thread Joel Webber
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,

[gwt-contrib] Re: Optimize if statements to conditionals and boolean ops if possible

2009-06-11 Thread Matt Mastracci
No problem... I haven't handled the common super-expression case (if (test) { return a; } else {return b; } - return test ? a : b), but that one should be pretty easy to tackle for a limited set of common super-expressions. On 11-Jun-09, at 5:53 AM, Joel Webber wrote: FWIW:

[gwt-contrib] Re: Optimize if statements to conditionals and boolean ops if possible

2009-06-11 Thread scottb
LGTM. Committed at r5540 with minor tweaks. http://gwt-code-reviews.appspot.com/36801 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---

[gwt-contrib] Re: Optimize if statements to conditionals and boolean ops if possible

2009-06-11 Thread Scott Blum
Matt, Could you review these two follow-on patches? The second depends on the first. This is mostly non-functional cleanup to make things a little simpler to read. The only substantive change is this: Presently, if we have a CanBooleanEval that fails to resolve, we do nothing else. My second

[gwt-contrib] Re: Optimize if statements to conditionals and boolean ops if possible

2009-06-11 Thread Matt Mastracci
Both LGTM. Good catch, thanks. :) On 11-Jun-09, at 1:15 PM, Scott Blum wrote: Matt, Could you review these two follow-on patches? The second depends on the first. This is mostly non-functional cleanup to make things a little simpler to read. The only substantive change is this: