Commit 165e725d authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

Reland "[compiler] Fix a few test flakes and reenable the tests"

This is a reland of 5dde281c,
after also fixing the ic-migrated-... test, in which an object died
too early.

Original change's description:
> [compiler] Fix a few test flakes and reenable the tests
>
> Bug: v8:12173
> Change-Id: I2983be9133f8ff4d1740e8eba05a3c29d603dfc3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3168270
> Auto-Submit: Georg Neis <neis@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76939}

Bug: v8:12173
Change-Id: If385e5c826b8470ef67f12705c5171f330f6cd57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171353
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76946}
parent f7ac5a29
......@@ -43,6 +43,7 @@
// The call with spread should have been inlined.
assertFalse(log_got_interpreted);
assertOptimized(foo);
%PrepareFunctionForOptimization(foo);
// This invalidates the DependOnArrayIteratorProtector and causes deopt.
Object.defineProperty(Array.prototype, Symbol.iterator, {
......
......@@ -38,6 +38,11 @@ function TestMapConstructorEntrySideEffect(ctor) {
ctor.prototype.set = originalPrototypeSet;
}
// Forbid inlining these helper functions to avoid deopt surprises.
%NeverOptimizeFunction(assertEquals);
%NeverOptimizeFunction(assertFalse);
%NeverOptimizeFunction(assertTrue);
%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
......@@ -48,6 +53,7 @@ assertOptimized(TestMapConstructorEntrySideEffect);
// This call would deopt
TestMapConstructorEntrySideEffect(WeakMap);
%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
TestMapConstructorEntrySideEffect(WeakMap);
......
......@@ -13,7 +13,8 @@ function load(o) { return o.x }
%PrepareFunctionForOptimization(load);
// Initialize the load IC with a map that will not be deprecated.
load(new A());
var a = new A();
load(a);
const oldB = new B();
(new B()).x = 1.5; // deprecates map
......
......@@ -211,11 +211,6 @@
'regress/regress-crbug-941743': [PASS, HEAVY],
'regress/regress-crbug-1191886': [PASS, HEAVY],
'wasm/externref-globals': [PASS, HEAVY],
# BUG(v8:12173).
'compiler/call-with-arraylike-or-spread-7': [PASS, FAIL],
'ic-migrated-map-add-when-monomorphic': [PASS, FAIL],
'es6/map-constructor-entry-side-effect2': [PASS, FAIL]
}], # ALWAYS
##############################################################################
......
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