Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Issue 147143003: ES6: Map and Set needs to normalize minus zero (Closed)

Created:
6 years, 10 months ago by arv (Not doing code reviews)
Modified:
6 years, 10 months ago
CC:
v8-dev
Visibility:
Public.

Description

ES6: Map and Set needs to normalize minus zero BUG=v8:3069 LOG=Y R=rossberg@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18892

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Change to use === 0 instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -27 lines) Patch
M src/collection.js View 1 8 chunks +23 lines, -27 lines 0 comments Download
M test/mjsunit/harmony/collections.js View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
arv (Not doing code reviews)
6 years, 10 months ago (2014-01-27 17:49:26 UTC) #1
Sven Panne
Quick DBC... https://codereview.chromium.org/147143003/diff/30001/src/collection.js File src/collection.js (right): https://codereview.chromium.org/147143003/diff/30001/src/collection.js#newcode51 src/collection.js:51: if (%_IsMinusZero(key)) { I think using "key ...
6 years, 10 months ago (2014-01-28 07:35:52 UTC) #2
rossberg
LGTM, modulo Sven's comment
6 years, 10 months ago (2014-01-28 14:33:18 UTC) #3
arv (Not doing code reviews)
Updated. PTAL
6 years, 10 months ago (2014-01-28 18:52:15 UTC) #4
rossberg
LGTM. Sven, could you please land this? I don't have access to a suitable machine ...
6 years, 10 months ago (2014-01-28 21:59:45 UTC) #5
Sven Panne
Committed patchset #2 manually as r18892 (presubmit successful).
6 years, 10 months ago (2014-01-29 07:27:13 UTC) #6
VMuhachev
On 2014/01/29 07:27:13, Sven Panne wrote: > Committed patchset #2 manually as r18892 (presubmit successful). ...
6 years, 10 months ago (2014-01-29 08:29:29 UTC) #7
arv (Not doing code reviews)
6 years, 10 months ago (2014-01-31 00:14:18 UTC) #8
Message was sent while issue was closed.
On 2014/01/29 08:29:29, VMuhachev wrote:
> On 2014/01/29 07:27:13, Sven Panne wrote:
> > Committed patchset #2 manually as r18892 (presubmit successful).
> 
> But how will this work after somebody will have implemented iteration over
keys?

What do you mean? The following is the correct ES6 behavior.

var map = new Map();
map.set(+0, 'plus');
map.set(-0, 'minus');
var keys = [...map.keys()];
assert.equal(keys.length, 1);
assert.equal(1 / keys[0], +Infinity);

We will never store a key with the value -0.

Powered by Google App Engine
This is Rietveld 408576698