mstarzinger@chromium.org
e405ff84b4
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
Review URL: https://codereview.chromium.org/11360089
Patch from Erik Arvidsson <arv@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 18:14:45 +00:00
mstarzinger@chromium.org
362381c68d
Fix Harmony Maps and WeakMaps for undefined values.
...
R=rossberg@chromium.org
BUG=chromium:132744
TEST=mjsunit/harmony/collections
Review URL: https://chromiumcodereview.appspot.com/10658014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-25 13:33:48 +00:00
mstarzinger@chromium.org
edc231e2a9
Fix return values for Harmony map and set operations.
...
R=rossberg@chromium.org
BUG=chromium:132741,chromium:132742
TEST=mjsunit/harmony/collections
Review URL: https://chromiumcodereview.appspot.com/10573011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 15:23:03 +00:00
mstarzinger@chromium.org
e79274abe6
Fix handling of bogus receivers for Harmony collections.
...
R=rossberg@chromium.org
BUG=v8:1884
TEST=mjsunit/harmony/collections
Review URL: http://codereview.chromium.org/9074003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 12:55:06 +00:00
mstarzinger@chromium.org
0bbfb46aa6
Fix Harmony sets and maps to allow undefined as keys.
...
This uses a global sentinel as a replacement for undefined keys, which
are not supported internally but required for Harmony sets and maps.
R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections
Review URL: http://codereview.chromium.org/8439069
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:33:58 +00:00
mstarzinger@chromium.org
79cadcc947
Fix Harmony sets and maps to allow null as key.
...
This changes the internal convention for marking deleted entries in hash
tables from null_value to the_hole_value, which is consistent with other
usages of the_hole.
R=rossberg@chromium.org ,kmillikin@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections
Review URL: http://codereview.chromium.org/8343056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:17:05 +00:00
mstarzinger@chromium.org
622d35dc0e
Implement Harmony sets and maps.
...
This implementation extends the internal ObjectHashTable to be able to
hold arbitrary objects (e.g. Smis, Strings, ...) as keys by applying
specialized hashing functions to primitive types. Equality of keys is
defined using the internal SameValue function.
R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections
Review URL: http://codereview.chromium.org/8372027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 14:14:56 +00:00