ES7: Implement Array.prototype.includes
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2015 21:37:53 +0000 (21:37 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2015 21:37:53 +0000 (21:37 +0000)
commitb67122e17fe02249b8a82e6f2c0d69824a1be064
tree2f66f55ee3eb6dde642f93702fcec1eb814cc9f7
parentd720f16ff539fccae931cab5f079d6f39ba8630e
ES7: Implement Array.prototype.includes
https://bugs.webkit.org/show_bug.cgi?id=142707

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for the ES7 includes method on Arrays.
https://github.com/tc39/Array.prototype.includes

* builtins/Array.prototype.js:
(includes): Implementation in JS.
* runtime/ArrayPrototype.cpp: Add 'includes' to the lookup table.

LayoutTests:

* js/array-includes-expected.txt: Added.
* js/array-includes.html: Added.
* js/script-tests/array-includes.js: Added.
* js/script-tests/Object-getOwnPropertyNames.js: Add 'includes'.
* js/Object-getOwnPropertyNames-expected.txt: Add 'includes'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/Object-getOwnPropertyNames-expected.txt
LayoutTests/js/array-includes-expected.txt [new file with mode: 0644]
LayoutTests/js/array-includes.html [new file with mode: 0644]
LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
LayoutTests/js/script-tests/array-includes.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/Array.prototype.js
Source/JavaScriptCore/runtime/ArrayPrototype.cpp