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

Issue 11360089: ES6: Adding support for size to Set and Map (Closed)

Created:
8 years, 1 month ago by arv (Not doing code reviews)
Modified:
8 years, 1 month ago
CC:
v8-dev
Visibility:
Public.

Description

ES6: Adding support for size to Set and Map Section 15.14.5.10 and 15.16.5.7 in the October 26, 2012 ES6 draft, http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts This adds a getter for "size" to Set.prototype and Map.prototype which reflects the number of elements in the Set and Map respectively. BUG=v8:2395 Committed: https://code.google.com/p/v8/source/detail?r=12875

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : Code review feedback #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -1 line) Patch
M src/collection.js View 1 2 4 chunks +20 lines, -0 lines 0 comments Download
M src/runtime.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 2 2 chunks +18 lines, -0 lines 0 comments Download
M src/v8natives.js View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/collections.js View 1 2 3 1 chunk +42 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
arv (Not doing code reviews)
8 years, 1 month ago (2012-11-05 19:28:31 UTC) #1
arv (Not doing code reviews)
-Sven, +Michael I intended mstarzinger to review this since he implemented Set and Map initially.
8 years, 1 month ago (2012-11-05 21:17:54 UTC) #2
Michael Starzinger
This is already looking good. Just a few comments. https://chromiumcodereview.appspot.com/11360089/diff/2001/src/collection.js File src/collection.js (right): https://chromiumcodereview.appspot.com/11360089/diff/2001/src/collection.js#newcode91 src/collection.js:91: ...
8 years, 1 month ago (2012-11-06 09:32:40 UTC) #3
arv (Not doing code reviews)
https://chromiumcodereview.appspot.com/11360089/diff/2001/src/collection.js File src/collection.js (right): https://chromiumcodereview.appspot.com/11360089/diff/2001/src/collection.js#newcode91 src/collection.js:91: function SetSize() { On 2012/11/06 09:32:40, Michael Starzinger wrote: ...
8 years, 1 month ago (2012-11-06 16:02:33 UTC) #4
Michael Starzinger
LGTM. I'll land this for you. https://chromiumcodereview.appspot.com/11360089/diff/2001/test/mjsunit/harmony/collections.js File test/mjsunit/harmony/collections.js (right): https://chromiumcodereview.appspot.com/11360089/diff/2001/test/mjsunit/harmony/collections.js#newcode324 test/mjsunit/harmony/collections.js:324: assertFalse(setSizeDescriptor.enumerable); On 2012/11/06 ...
8 years, 1 month ago (2012-11-06 17:47:55 UTC) #5
arv (Not doing code reviews)
8 years, 1 month ago (2012-11-06 18:49:43 UTC) #6
Thanks.

https://chromiumcodereview.appspot.com/11360089/diff/2001/test/mjsunit/harmon...
File test/mjsunit/harmony/collections.js (right):

https://chromiumcodereview.appspot.com/11360089/diff/2001/test/mjsunit/harmon...
test/mjsunit/harmony/collections.js:324:
assertFalse(setSizeDescriptor.enumerable);
On 2012/11/06 17:47:55, Michael Starzinger wrote:
> On 2012/11/06 16:02:33, arv wrote:
> > On 2012/11/06 09:32:40, Michael Starzinger wrote:
> > > I couldn't find the expected value of the attributes (i.e. enumerable and
> > > configurable) in the draft spec. Is that still unspeced?
> > 
> > Last sentence of last paragraph in the introduction to clause 15:
> > 
> > Every other property described in this clause has the attributes {
> [[Writable]]:
> > true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise
> > specified.
> 
> Ah, yes, I didn't see this sentence. To be pedantic (as Andreas pointed out),
> this sentence is talking about data properties (as it contains the writable
> attribute) and it's unclear whether is also applies to accessor properties.
But
> I am fine to land this CL as it is even without a clarification on this part.

I had a hard time finding this too. I even filed an ES6 bug before Allen pointed
out where to find this.

https://bugs.ecmascript.org/show_bug.cgi?id=931

Powered by Google App Engine
This is Rietveld 408576698