ES6: Add missing Set.prototype.keys function
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 30 Jun 2014 14:37:07 +0000 (14:37 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 30 Jun 2014 14:37:07 +0000 (14:37 +0000)
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype.keys

The value of the keys property is just the initial value of the values
function.

BUG=v8:3411
LOG=Y
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/353293003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/collection-iterator.js
test/mjsunit/harmony/collection-iterator.js

index b8b304e..096e30d 100644 (file)
@@ -87,6 +87,7 @@ function ExtendSetPrototype() {
 
   InstallFunctions($Set.prototype, DONT_ENUM, $Array(
     'entries', SetEntries,
+    'keys', SetValues,
     'values', SetValues
   ));
 
index a3a950a..93113f6 100644 (file)
 })();
 
 
+(function TestSetIteratorKeys() {
+  assertEquals(Set.prototype.keys, Set.prototype.values);
+})();
+
+
 (function TestSetIteratorEntries() {
   var s = new Set;
   s.add(1);