Bug 147590

Summary: The JSONP parser incorrectly parsers -0 as +0.
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Benchmark results none

Description Keith Miller 2015-08-03 14:08:26 PDT
Running x = -0 on the jsc command line causes x to be set to 0 rather than -0. This is due to an issue in the JSONP parser which stores the accumulator variable while reading the number token as an int rather than a double.
Comment 1 Keith Miller 2015-08-03 14:17:01 PDT
Created attachment 258112 [details]
Patch
Comment 2 Michael Saboff 2015-08-03 14:24:31 PDT
Comment on attachment 258112 [details]
Patch

r=me provided there aren't any performance regressions.
Comment 3 Keith Miller 2015-08-03 15:26:40 PDT
Created attachment 258124 [details]
Benchmark results

Adding my benchmark results for posterity.
Comment 4 Keith Miller 2015-08-03 15:30:57 PDT
rdar://problem/22101327
Comment 5 WebKit Commit Bot 2015-08-06 16:24:11 PDT
Comment on attachment 258112 [details]
Patch

Clearing flags on attachment: 258112

Committed r188085: <http://trac.webkit.org/changeset/188085>
Comment 6 WebKit Commit Bot 2015-08-06 16:24:15 PDT
All reviewed patches have been landed.  Closing bug.