Closure compiler does a number of these kind of transformations. Like:

String(x)

to:

'' + x



On Tue, Jan 3, 2012 at 6:21 PM, <[email protected]> wrote:

>
> I think it will be nice to add a future JS optimization that collapses
> something like String(x) + expr or x + String(y), into x + y. Maybe
> Closure already has this, I'll have to check.
>
>
> On 2012/01/03 21:55:36, jat wrote:
>
>> See my comments on the referenced bug, but basically I am not sure I
>>
> agree with
>
>> the change being made.
>>
>
>  That said, the cost to projects that don't care is pretty small, so I
>>
> could be
>
>> convinced.
>>
>
>
>
> http://gwt-code-reviews.**appspot.com/1623803/<http://gwt-code-reviews.appspot.com/1623803/>
>
> --
> http://groups.google.com/**group/Google-Web-Toolkit-**Contributors<http://groups.google.com/group/Google-Web-Toolkit-Contributors>
>

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

Reply via email to