Commit dbe98c80 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[turbofan] Fix some tests

Stress configurations cause maps to be GC'ed too early.
We now keep them alive by storing the object in a global variable.

Bug: v8:10892
Change-Id: If03c42612d9907b3b6d0df8bb2de879857a89e0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2404774Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69862}
parent 4e92ed8d
......@@ -9,6 +9,7 @@
function shift_array() {
let array = [];
Object.defineProperty(array, 'length', {writable : false});
out = array; // Prevent array's map from dying too early.
return array.shift();
}
......@@ -23,6 +24,7 @@ assertOptimized(shift_array);
function shift_object() {
let object = { length: 0 };
Object.defineProperty(object, 'length', {writable : false});
out = object; // Prevent object's map from dying too early.
return object.shift();
}
......
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