[JSC] Rename Array#flatten to flat
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 May 2018 18:17:09 +0000 (18:17 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 May 2018 18:17:09 +0000 (18:17 +0000)
commitc89bfe4d7ba21b47bb1cf85649779b0619ba9bd2
tree6be48582e0b661d9b9f33e4f3bc101129edb2a24
parenta7a0eb7cabbcf0fca8e003311dbb18e16c2ef57a
[JSC] Rename Array#flatten to flat
https://bugs.webkit.org/show_bug.cgi?id=186012

Reviewed by Saam Barati.

JSTests:

* stress/array-flatten.js:
(shouldThrow):
* test262/expectations.yaml:

Source/JavaScriptCore:

Rename Array#flatten to Array#flat. This rename is done in TC39 since flatten
conflicts with the mootools' function name.

* builtins/ArrayPrototype.js:
(globalPrivate.flatIntoArray):
(flat):
(globalPrivate.flatIntoArrayWithCallback):
(flatMap):
(globalPrivate.flattenIntoArray): Deleted.
(flatten): Deleted.
(globalPrivate.flattenIntoArrayWithCallback): Deleted.
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/array-flatten.js
JSTests/test262/expectations.yaml
LayoutTests/ChangeLog
LayoutTests/inspector/model/remote-object-get-properties-expected.txt
LayoutTests/js/Object-getOwnPropertyNames-expected.txt
LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/ArrayPrototype.js
Source/JavaScriptCore/runtime/ArrayPrototype.cpp