Commit 1a033ae8 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[test] Reduce iteration count in elements-kind test

Change-Id: I0117b0c2b646cb1005b63e9648d604b26581d977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335187Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69229}
parent 1742d256
......@@ -109,11 +109,16 @@ function test_wrapper() {
assertKind(elements_kind.fast, you);
var temp = [];
temp[0xDECAF] = 0;
// If we store beyond kMaxGap (1024) we should transition to slow elements.
temp[1024] = 0;
assertKind(elements_kind.dictionary, temp);
var fast_double_array = new Array(0xDECAF);
for (var i = 0; i < 0xDECAF; i++) fast_double_array[i] = i / 2;
// If the gap is greater than 1024 (kMaxGap) we would transition the array
// to slow. So increment should be less than 1024.
for (var i = 0; i < 0xDECAF; i+=1023) {
fast_double_array[i] = i / 2;
}
assertKind(elements_kind.fast_double, fast_double_array);
assertKind(elements_kind.fixed_int8, new Int8Array(007));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment