[ES6] Implement Array.prototype.values
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Apr 2015 09:50:40 +0000 (09:50 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Apr 2015 09:50:40 +0000 (09:50 +0000)
commit9d80c05e70d80cad4a7e26c549070d9f37d53384
tree34b31b68d3ff1fbc9a3209855283459703af4f8d
parent7c53f8e1d21a03b95fa1894292f93a8cd01dc4ee
[ES6] Implement Array.prototype.values
https://bugs.webkit.org/show_bug.cgi?id=143633

Reviewed by Darin Adler.

Source/JavaScriptCore:

Symbol.unscopables is implemented, so we can implement Array.prototype.values
without largely breaking the web. The following script passes.

var array = [];
var values = 42;
with (array) {
    assert(values, 42);
}

* runtime/ArrayPrototype.cpp:
* tests/stress/array-iterators-next.js:
* tests/stress/map-iterators-next.js:
* tests/stress/set-iterators-next.js:
* tests/stress/values-unscopables.js: Added.
(test):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/array-iterators-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/array-iterators.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/Object-getOwnPropertyNames-expected.txt
LayoutTests/js/array-iterators-expected.txt
LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
LayoutTests/js/script-tests/array-iterators.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/tests/stress/array-iterators-next.js
Source/JavaScriptCore/tests/stress/map-iterators-next.js
Source/JavaScriptCore/tests/stress/set-iterators-next.js
Source/JavaScriptCore/tests/stress/values-unscopables.js [new file with mode: 0644]