Commit 862c6281 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[sparkplug] Use NeverOptimize in tests

This prevents conflicts with e.g. --always-opt

Fixed: v8:11462
Change-Id: Ib98378a1bf620f5706bf3eef06f997bd994b1e2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2700035
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72815}
parent a009029c
......@@ -19,6 +19,8 @@
let f1 = Realm.eval(realm1, "(" + factory1.toString() + ")")();
let f2 = Realm.eval(realm2, "(" + factory1.toString() + ")")();
%NeverOptimizeFunction(f1);
%NeverOptimizeFunction(f2);
%CompileBaseline(f1);
assertEquals(0, f1(0));
......@@ -46,6 +48,9 @@
let realmFactory = Realm.eval(realm2, "(" + factory2.toString() + ")");
let f2 = realmFactory();
let f3 = realmFactory();
%NeverOptimizeFunction(f1);
%NeverOptimizeFunction(f2);
%NeverOptimizeFunction(f3);
assertEquals(0, f2(0));
%CompileBaseline(f1);
......
......@@ -294,6 +294,9 @@ assertEquals(run((x)=>{
}
let f1 = factory();
let f2 = factory();
%NeverOptimizeFunction(f1);
%NeverOptimizeFunction(f2);
assertEquals(f1(0), 0);
assertEquals(f2(0), 0);
assertTrue(isInterpreted(f1))
......
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