v8/test/mjsunit/compiler/dont-flush-code-marked-for-opt.js
Ross McIlroy c03e6f0127 [Test] Avoid relying on flag implications for --flush-bytecode in tests.
Causes flakyness in TSAN runs when flag is written by EnforceFlagImplications
and read by ConcurrentMarking.

BUG=v8:8924

Change-Id: I2b0bf0fbb678e03492d7ed13e48657de9316b700
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1505796
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60062}
2019-03-06 15:34:13 +00:00

17 lines
412 B
JavaScript

// Copyright 2019 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: --opt --allow-natives-syntax --expose-gc --flush-bytecode
// Flags: --stress-flush-bytecode
function foo(a) {}
%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
gc();
foo();
assertOptimized(foo);