- 24 May, 2019 3 commits
-
-
Simon Zünd authored
This is a reland of 2b0ac2fb The layout test that caused this revert was fixed with: https://crrev.com/c/1627386 Original change's description: > [array] Move Array#sort pre-processing to Torque > > This CL removes the "PrepareElementsForSort" runtime function, and > replaces it with a simpler version in Torque. The biggest difference > is that certain sparse configurations no longer have a fast-path. > > The Torque pre-processing step replaces the existing Torque mechanism that > copied already pre-processed elements into the "work" FixedArray. The Torque > compacting works as follows: > - Iterate all elements from 0 to {length} > - If the element is the hole: Do nothing. > - If the element is "undefined": Increment undefined counter. > - In all other cases, push the element into the "work" FixedArray. > > Then the "work" FixedArray is sorted as before. Writing the elements from > the "work" array back into the receiver, after sorting, has three steps: > 1. Copy the sorted elements from the "work" FixedArray to the receiver. > 2. Add previously counted number of "undefined" to the receiver. > 3. Depending on the backing store either delete properties or > set them to the Hole up to {length}. > > Bug: v8:8714 > Change-Id: I14eccb7cfd2e4618bce2a85cba0689d7e0380ad2 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619756 > Commit-Queue: Simon Zünd <szuend@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#61812} TBR: jgruber@chromium.org Bug: v8:8714 Change-Id: If7613f6e5f37c5e0d649e8192195594bc6c32100 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627977 Commit-Queue: Simon Zünd <szuend@chromium.org> Auto-Submit: Simon Zünd <szuend@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61827}
-
Simon Zünd authored
This reverts commit 2b0ac2fb. Reason for revert: Breaks scrollingcoordinator/non-fast-scrollable-region-nested.html layout test on https://ci.chromium.org/p/v8/builders/ci/V8-Blink%20Linux%2064/32241 Original change's description: > [array] Move Array#sort pre-processing to Torque > > This CL removes the "PrepareElementsForSort" runtime function, and > replaces it with a simpler version in Torque. The biggest difference > is that certain sparse configurations no longer have a fast-path. > > The Torque pre-processing step replaces the existing Torque mechanism that > copied already pre-processed elements into the "work" FixedArray. The Torque > compacting works as follows: > - Iterate all elements from 0 to {length} > - If the element is the hole: Do nothing. > - If the element is "undefined": Increment undefined counter. > - In all other cases, push the element into the "work" FixedArray. > > Then the "work" FixedArray is sorted as before. Writing the elements from > the "work" array back into the receiver, after sorting, has three steps: > 1. Copy the sorted elements from the "work" FixedArray to the receiver. > 2. Add previously counted number of "undefined" to the receiver. > 3. Depending on the backing store either delete properties or > set them to the Hole up to {length}. > > Bug: v8:8714 > Change-Id: I14eccb7cfd2e4618bce2a85cba0689d7e0380ad2 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619756 > Commit-Queue: Simon Zünd <szuend@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#61812} TBR=peter.wm.wong@gmail.com,jgruber@chromium.org,tebbi@chromium.org,szuend@chromium.org Change-Id: If1c1bc07f38dfbd4bf6b6ce8f9d70714e7526877 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8714 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627976Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#61814}
-
Simon Zünd authored
This CL removes the "PrepareElementsForSort" runtime function, and replaces it with a simpler version in Torque. The biggest difference is that certain sparse configurations no longer have a fast-path. The Torque pre-processing step replaces the existing Torque mechanism that copied already pre-processed elements into the "work" FixedArray. The Torque compacting works as follows: - Iterate all elements from 0 to {length} - If the element is the hole: Do nothing. - If the element is "undefined": Increment undefined counter. - In all other cases, push the element into the "work" FixedArray. Then the "work" FixedArray is sorted as before. Writing the elements from the "work" array back into the receiver, after sorting, has three steps: 1. Copy the sorted elements from the "work" FixedArray to the receiver. 2. Add previously counted number of "undefined" to the receiver. 3. Depending on the backing store either delete properties or set them to the Hole up to {length}. Bug: v8:8714 Change-Id: I14eccb7cfd2e4618bce2a85cba0689d7e0380ad2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619756 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#61812}
-
- 22 Jan, 2019 1 commit
-
-
Simon Zünd authored
This CL enables the pre-processing step of copying from the prototype chain for JSArrays. Previously, this was done for everything BUT JSArrays. This brings Array#sort more in line with other engines in the case of undefined behavior. R=jgruber@chromium.org Bug: v8:8666 Change-Id: I832d470dc02111b64dc4919e84e7e3e47c8fdd47 Reviewed-on: https://chromium-review.googlesource.com/c/1426119 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#58999}
-
- 24 May, 2018 1 commit
-
-
Sigurd Schneider authored
The slow test tests SmiLexicographicCompare on a large number of Smi comparisons; we can disable this test for some debug/noopt builds without losing much coverage. Bug: v8:7783 Change-Id: Iab40e596604bb957b4d3312073ad85dbac08c6a0 Reviewed-on: https://chromium-review.googlesource.com/1068190 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#53333}
-
- 08 May, 2018 2 commits
-
-
Simon Zünd authored
To stay compatible with JSC, Array.p.sort did a post-processing step that shadowed elements from the prototype chain. Some time ago, JSC changed and no longer exhibits this behavior. To preserve comptibility and stay consistent with RemoveArrayHoles, this CL removes this post-processing step altogether and adjusts tests to expect the new behavior. R=cbruni@chromium.org, jgruber@chromium.org Bug: v8:7382 Change-Id: Iecedc37cea25001d3768b99a3a9de3a2db90ba82 Reviewed-on: https://chromium-review.googlesource.com/1047286 Commit-Queue: Simon Zünd <szuend@google.com> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#53066}
-
Simon Zünd authored
This CL implements the functionality of SafeRemoveArrayHoles (JS), which is used as a pre-processing step for sorting, in a runtime function. SafeRemoveArrayHoles is a generic fallback, when an existing runtime function fails to remove holes/move undefineds to the end of an array. This CL extends the existing runtime function to also support JSProxy objects, and objects where indices have accessors. R=cbruni@chromium.org, jgruber@chromium.org Bug: v8:7382 Change-Id: I4881539cf2171caba08ff6e3e50320291f49839c Reviewed-on: https://chromium-review.googlesource.com/1041950 Commit-Queue: Simon Zünd <szuend@google.com> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#53060}
-
- 16 Apr, 2018 1 commit
-
-
Simon Zünd authored
This adds tests for 'oddly' behaving comparison functions. I.e. functions that cause an element kind change and/or modify the array. The tests check that sort does not crash in these instances. R=jgruber@chromium.org Bug: v8:7382 Change-Id: I4ac9aa081fda9088d1848a960dc66aba671872e5 Reviewed-on: https://chromium-review.googlesource.com/1010062 Commit-Queue: Simon Zünd <szuend@google.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#52612}
-
- 27 Feb, 2018 1 commit
-
-
Choongwoo Han authored
Always return the given length (limit) for typed arrays in PrepareElementsForSort since typed arrays do not have holes. Bug: v8:6719 Change-Id: Ic455ceca6563fc66a4e4a78c7bf5df1ad17afb4a Reviewed-on: https://chromium-review.googlesource.com/615104Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#51588}
-
- 20 Oct, 2017 1 commit
-
-
Mathias Bynens authored
The spec got rid of `CheckObjectCoercible` a while back, and so should we. This change is not observable in most of the affected cases since `ToObject` is up near the top of most Array method algorithms. An example of an observable effect of this change occurs for the following input: Array.prototype.sort.call(null, 1); Behavior before applying the patch (incorrect message): TypeError: Array.prototype.sort called on null or undefined Expected behavior: TypeError: The comparison function must be either a function or undefined This patch removes `CheckObjectCoercible` and adds tests to ensure the few observable cases are addressed correctly. The patch also adds a missing `ToObject(this)` to `Array.prototype.lastIndexOf` which would otherwise become observable as a result of `CheckObjectCoercible` being removed. BUG=v8:3577,v8:6921 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ia086095076c4bf4d8d58dab26bc28df02994ed01 Reviewed-on: https://chromium-review.googlesource.com/718577Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#48800}
-
- 11 Feb, 2017 1 commit
-
-
cwhan.tunz authored
Do not allow that holey properties are defined in Array sort. Throw a type error if the array is not extensible and there are holey properties in the middle of the array. BUG=v8:4888 Review-Url: https://codereview.chromium.org/2664173002 Cr-Commit-Position: refs/heads/master@{#43126}
-
- 13 Jun, 2016 1 commit
-
-
cbruni authored
Array.prototype.sort would not work properly on sloppy arguments of size > 2. BUG=chromium:618613 Review-Url: https://codereview.chromium.org/2051413004 Cr-Commit-Position: refs/heads/master@{#36920}
-
- 29 Mar, 2016 1 commit
-
-
neis authored
This fixes another bug in Array.prototype.sort (when the array is not a JSArray and there is a proxy on the prototype chain). R=cbruni@chromium.org BUG=chromium:596866 LOG=n Review URL: https://codereview.chromium.org/1842563004 Cr-Commit-Position: refs/heads/master@{#35101}
-
- 04 Mar, 2016 1 commit
-
-
neis authored
BUG=chromium:591699 LOG=n R=rossberg Review URL: https://codereview.chromium.org/1764953002 Cr-Commit-Position: refs/heads/master@{#34498}
-
- 11 Jun, 2015 1 commit
-
-
dehrenberg authored
The spec says ToObject is called on the receiver, and this is observable if you call sort on a primitive. This patch trivially adds the call and a test. BUG=v8:4125 R=adamk LOG=Y Review URL: https://codereview.chromium.org/1178193004 Cr-Commit-Position: refs/heads/master@{#28972}
-
- 17 Sep, 2014 1 commit
-
-
wingo@igalia.com authored
BUG=v8:3537 LOG= R=arv@chromium.org, wingo@igalia.com, yangguo@chromium.org Review URL: https://codereview.chromium.org/555173002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 01 Sep, 2011 1 commit
-
-
yangguo@chromium.org authored
Review URL: http://codereview.chromium.org/7826007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Jun, 2011 1 commit
-
-
http://codereview.chromium.org/7261008erik.corry@gmail.com authored
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 20 Dec, 2010 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/6039002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Jun, 2009 1 commit
-
-
whesse@chromium.org authored
Make Array.sort safely generic on JSObject types. Fix bug 346 http://code.google.com/p/v8/issues/detail?id=346 Review URL: http://codereview.chromium.org/119357 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 May, 2009 1 commit
-
-
lrn@chromium.org authored
Long running array-sort test times out on ARM. Also fixed a bug in another test. Review URL: http://codereview.chromium.org/100330 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 01 May, 2009 1 commit
-
-
lrn@chromium.org authored
Made sort on non-objects with inherited elements JSC compatible. Review URL: http://codereview.chromium.org/99272 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 27 Apr, 2009 1 commit
-
-
lrn@chromium.org authored
Change handling of sorting to be the same for all JS-arrays. Collect undefined values as well while removing holes. Review URL: http://codereview.chromium.org/92123 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Oct, 2008 1 commit
-
-
olehougaard authored
Review URL: http://codereview.chromium.org/7137 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Oct, 2008 1 commit
-
-
olehougaard authored
Changed 'undefined' in ArraySort to 'void 0'. Also added regression test to catch the error. Review URL: http://codereview.chromium.org/6073 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 25 Sep, 2008 1 commit
-
-
olehougaard authored
Using quick sort in ArraySort instead of heap sort for better performance. Review URL: http://codereview.chromium.org/4065 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 17 Sep, 2008 1 commit
-
-
erik.corry@gmail.com authored
Review URL: http://codereview.chromium.org/2923 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Sep, 2008 1 commit
-
-
christian.plesner.hansen@gmail.com authored
Added presubmit step to check copyright. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Sep, 2008 1 commit
-
-
ager@chromium.org authored
Avoid runtime calls for trivial object equality checks. Minor style cleanups. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Aug, 2008 1 commit
-
-
christian.plesner.hansen authored
In the shell sample don't print the result of executing a script, only evaluating expressions. Fixed issue when building samples on Windows using a shared V8 library. Added visibility option on Linux build which makes the generated library 18% smaller. Changed build system to accept multiple build modes in one build and generate seperate objects, libraries and executables for each mode. Removed deferred negation optimization (a * -b => -(a * b)) since this visibly changes operand conversion order. Improved parsing performance by introducing stack guard in preparsing. Without a stack guard preparsing always bails out with stack overflow. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 03 Jul, 2008 1 commit
-
-
christian.plesner.hansen authored
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-