v8/test/mjsunit/wasm/tier-up-testing-flag.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
JavaScript
Raw Normal View History

// Copyright 2017 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.
Revert "Reland^2 "[flags] warn about contradictory flags"" This reverts commit 0ba115e6a9ef0a8aa2af9ce22a1a4521a4a0b363. Reason for revert: Breaks test on TSAN - block-conflicts https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20concurrent%20marking/14230 Original change's description: > Reland^2 "[flags] warn about contradictory flags" > > This is a reland of d8f8a7e2105305921ca31450ecc38e009bc075c3 > Change compared to last reland: > - Do not check for d8 flag contradictions in the presence of --fuzzing > - Allow identical re-declaration of --cache=* > > Original change's description: > > Reland "[flags] warn about contradictory flags" > > > > This is a reland of b8f91666649b637e87a338f884d7987b169f6692 > > Difference to previous CL: Additional functionality to specify > > incompatible flags based on GN variables and extra-flags, used > > to fix the issues that came up on the waterfall. > > > > This also changes the rules regarding repeated flags: While > > explicitly repeated flags are allowed for boolean values as long > > as they are identical, repeated flags or explicit flags in the > > presence of an active implication are disallowed for non-boolean > > flags. The latter simplifies specifying conflict rules in > > variants.py. Otherwise a rule like > > > > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = { > > "--gc-interval=*": ["--gc-interval=*"], > > } > > > > wouldn't work because specifying the same GC interval twice > > wouldn't actually count as a conflict. This was an issue with > > test/mjsunit/wasm/gc-buffer.js, which specifies > > --gc-interval=500 exactly like the extra flag by the stress bot. > > > > Also, this now expands contradictory flags checking to d8 flags > > for consistency. > > > > Original change's description: > > > [flags] warn about contradictory flags > > > > > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/ > > > > > > Bug: v8:10577 > > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792 > > > Reviewed-by: Clemens Backes <clemensb@chromium.org> > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org> > > > Reviewed-by: Georg Neis <neis@chromium.org> > > > Reviewed-by: Tamer Tas <tmrts@chromium.org> > > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > > > Cr-Commit-Position: refs/heads/master@{#68168} > > > > Bug: v8:10577 > > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115 > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > > Reviewed-by: Tamer Tas <tmrts@chromium.org> > > Reviewed-by: Clemens Backes <clemensb@chromium.org> > > Reviewed-by: Georg Neis <neis@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#68989} > > Bug: v8:10577 > Change-Id: I31d2794d4f9ff630f3444210100c64d67d881276 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339464 > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#69339} TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org Change-Id: I1454a05e357ddd704db7fb79e51be65d45a9a16e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10577 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2348365 Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#69341}
2020-08-11 17:11:53 +00:00
// Flags: --allow-natives-syntax --liftoff --no-future --no-wasm-tier-up
// Compile functions 0 and 2 with Turbofan, the rest with Liftoff:
// Flags: --wasm-tier-mask-for-testing=5
load('test/mjsunit/wasm/wasm-module-builder.js');
const num_functions = 5;
function create_builder() {
const builder = new WasmModuleBuilder();
for (let i = 0; i < num_functions; ++i) {
builder.addFunction('f' + i, kSig_i_v)
.addBody(wasmI32Const(i))
.exportFunc();
}
return builder;
}
function check(instance) {
for (let i = 0; i < num_functions; ++i) {
const expect_liftoff = i != 0 && i != 2;
assertEquals(
expect_liftoff, %IsLiftoffFunction(instance.exports['f' + i]),
'function ' + i);
}
}
(function testTierTestingFlag() {
print(arguments.callee.name);
const instance = create_builder().instantiate();
check(instance);
})();
async function testTierTestingFlag() {
print(arguments.callee.name);
const instance = await create_builder().asyncInstantiate();
check(instance);
}
assertPromiseResult(testTierTestingFlag());