[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-12 Thread Ray Cromwell
I think String.valueOf(x) is ok, because if this happens at runtime, it will pick up the JS VM toString behavior. If it is handled at compile time, than it is evaluated with JsStaticEval. "" + 1.004E5 -> 100400. I think the real problem might be differences that might crop up in hosted mode. Leav

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-12 Thread John Tamplin
On Mon, Apr 12, 2010 at 10:59 AM, Lex Spoon wrote: > Interesting subthreads aside, does the change in this patch LGT everyone? > I don't know enough to comment, so FHMP. > Well, not if we are using it in contexts where it is expected to be all >> digits, as in the original bug. >> >> > True. >

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-12 Thread Lex Spoon
Interesting subthreads aside, does the change in this patch LGT everyone? On Fri, Apr 9, 2010 at 6:58 PM, John Tamplin wrote: > On Fri, Apr 9, 2010 at 6:29 PM, Lex Spoon wrote: > >> Changing it is fine. However, the ideal change would be to whichever way >> takes the fewest bytes! >> > > Well,

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread John Tamplin
On Fri, Apr 9, 2010 at 6:29 PM, Lex Spoon wrote: > Changing it is fine. However, the ideal change would be to whichever way > takes the fewest bytes! > Well, not if we are using it in contexts where it is expected to be all digits, as in the original bug. -- John A. Tamplin Software Engineer

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread Lex Spoon
On Fri, Apr 9, 2010 at 4:50 PM, Ray Cromwell wrote: > What about JS string promotion tho? Imagine the following: > > var x = "Hello"; > var y = 2.0041234E3 > alert(x + y); > > If y was originally "20041234000" but JsToStringGenerationVisitor > serialized it in scientific notation, then this would

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread John Tamplin
On Fri, Apr 9, 2010 at 4:21 PM, Lex Spoon wrote: > John, I've been thinking about String.valueOf(). That one's tough, because > ideally we want the Java conversion. That's generally our story with > compiled GWT code: it behaves the same as it would on a JVM. Unfortunately, > I don't see an ea

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread Lex Spoon
On Fri, Apr 9, 2010 at 3:29 PM, wrote: > On 2010/04/09 15:16:19, jat wrote: > >> Do we need to also change String.valueOf(*) which just uses "" + val? >> > > Good point. There might be other places where JsNumberLiteral is changed > to a String, so we should look at that. Lex, look at > JsToStrin

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread cromwellian
On 2010/04/09 15:16:19, jat wrote: Do we need to also change String.valueOf(*) which just uses "" + val? Good point. There might be other places where JsNumberLiteral is changed to a String, so we should look at that. Lex, look at JsToStringGenerationVisitor.visit(JsNumberLiteral x, JsContext c

[gwt-contrib] Re: When JsStaticEval converts a number to a string, use the JS (issue335801)

2010-04-09 Thread jat
Do we need to also change String.valueOf(*) which just uses "" + val? http://gwt-code-reviews.appspot.com/335801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using "remove me" as the subject.