Bug 142709 - Update Map/Set to treat -0 and 0 as the same value
Summary: Update Map/Set to treat -0 and 0 as the same value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-15 00:01 PDT by Joseph Pecoraro
Modified: 2015-03-16 08:46 PDT (History)
3 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (6.15 KB, patch)
2015-03-15 00:04 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-03-15 00:01:49 PDT
* SUMMARY
MDN says "In earlier versions of the ECMAScript 6 draft -0 and +0 were considered distinct (even though -0 === +0), this has been changed in later versions". JSC is still treating -0 and 0 as distinct keys. Firefox and Chrome treat -0/0 the same. We should update.

ES6 May 14, 2013 Draft ChangeLog notes:
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
http://wiki.ecmascript.org/doku.php?id=harmony:older_es6_drafts
Added SameValueZero abstraction operation that considers -0 and +0 to be the same value.
SameValueZero is only used by Map/Set operations.
Comment 1 Joseph Pecoraro 2015-03-15 00:04:19 PDT
Created attachment 248675 [details]
[PATCH] Proposed Fix
Comment 2 Csaba Osztrogonác 2015-03-16 08:02:36 PDT
Comment on attachment 248675 [details]
[PATCH] Proposed Fix

LGTM
Comment 3 WebKit Commit Bot 2015-03-16 08:46:29 PDT
Comment on attachment 248675 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 248675

Committed r181556: <http://trac.webkit.org/changeset/181556>
Comment 4 WebKit Commit Bot 2015-03-16 08:46:33 PDT
All reviewed patches have been landed.  Closing bug.