Array.prototype.sort should call @toLength instead of ">>> 0"
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2018 18:02:05 +0000 (18:02 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2018 18:02:05 +0000 (18:02 +0000)
commitfa644e89d3192dc18f94582c7ed50dce7bb5b8b7
treeeaca711b77774d070272ff76d3cb49f11d46a815
parent14a74dd21683d2655b0b30a8629e3cbb247f685d
Array.prototype.sort should call @toLength instead of ">>> 0"
https://bugs.webkit.org/show_bug.cgi?id=188430

Reviewed by Saam Barati.

JSTests:

* test262/expectations.yaml:

Source/JavaScriptCore:

Also add a new function to $vm that will fetch a private
property. This can be useful for running builtin helper functions.

* builtins/ArrayPrototype.js:
(sort):
* tools/JSDollarVM.cpp:
(JSC::functionGetPrivateProperty):
(JSC::JSDollarVM::finishCreation):

LayoutTests:

Remove invalid conformance test expectations. Array.prototype.sort calls toLength, which
does not truncate integers.

* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T1.html:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T2.html:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T3.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/test262/expectations.yaml
LayoutTests/ChangeLog
LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T1.html
LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T2.html
LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.11_Array_prototype_sort/S15.4.4.11_A4_T3.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/ArrayPrototype.js
Source/JavaScriptCore/tools/JSDollarVM.cpp