[change-array-by-copy] Split out slow toReversed test
Bug: v8:13328, v8:12764 Change-Id: Idd079b6eaa7e47b0cbe57840e9cd185c2abfe7dd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913771 Reviewed-by: Adam Klein <adamk@chromium.org> Auto-Submit: Shu-yu Guo <syg@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#83440}
This commit is contained in:
parent
890ee74ca7
commit
6cd16f02cb
14
test/mjsunit/harmony/array-to-reversed-big.js
Normal file
14
test/mjsunit/harmony/array-to-reversed-big.js
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2022 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --harmony-change-array-by-copy
|
||||
|
||||
(function TestBigPacked() {
|
||||
let a = [];
|
||||
for (let i = 0; i < 50000; i++) a.push(i);
|
||||
let r = a.toReversed();
|
||||
for (let i = 0; i < 50000; i++) {
|
||||
assertEquals(r[i], a.at(-(i+1)));
|
||||
}
|
||||
})();
|
@ -61,15 +61,6 @@ assertEquals("toReversed", Array.prototype.toReversed.name);
|
||||
assertEquals([], [].toReversed());
|
||||
})();
|
||||
|
||||
(function TestBig() {
|
||||
let a = [];
|
||||
for (let i = 0; i < 50000; i++) a.push(i);
|
||||
let r = a.toReversed();
|
||||
for (let i = 0; i < 50000; i++) {
|
||||
assertEquals(r[i], a.at(-(i+1)));
|
||||
}
|
||||
})();
|
||||
|
||||
(function TestTooBig() {
|
||||
let a = { length: Math.pow(2, 32) };
|
||||
assertThrows(() => Array.prototype.toReversed.call(a), RangeError);
|
||||
|
@ -1413,6 +1413,10 @@
|
||||
# it. In the slow path, this results in one runtime call per element, which
|
||||
# takes several minutes overall.
|
||||
'regress/wasm/regress-9017': [SKIP],
|
||||
|
||||
# This tests Array#toReversed on a big packed array, which is created by
|
||||
# repeated calls to Array#push. In the slow path this is very slow.
|
||||
'harmony/array-to-reversed-big': [SKIP],
|
||||
}], # variant == slow_path
|
||||
|
||||
['((arch == mips64el or arch == mips64) and not simd_mips) or (arch in [ppc64])', {
|
||||
|
Loading…
Reference in New Issue
Block a user