v8/test/message/wasm-trace-liftoff.js
Clemens Backes 5839231f7b [test] Automatically add --no-stress-opt to message tests
Message tests check the output of a test against an expected file.
Executing with --stress-opt changes the output, since the test will be
run multiple times. For that reason, most message tests explicitly add
the --no-stress-opt flag.

Since this is redundant, and not a per-test setting, just configure this
globally for all message tests instead.

R=machenbach@chromium.org

Bug: v8:12425
Change-Id: I52f1b43da2781fcb6f6bd37e67d483ca69c1c929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3471637
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79164}
2022-02-18 08:51:12 +00:00

56 lines
2.4 KiB
JavaScript

// Copyright 2020 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: --trace-wasm --no-wasm-tier-up --liftoff
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
let kRet23Function = builder.addFunction('ret_23', kSig_i_v)
.addBody([kExprI32Const, 23])
.exportFunc()
.index;
let kCall23Function = builder.addFunction('call_23', kSig_i_v)
.addBody([kExprCallFunction, kRet23Function])
.exportFunc()
.index;
let kRet57Function = builder.addFunction('ret_57', kSig_l_v)
.addBody([kExprI64Const, 57])
.exportFunc()
.index;
let kUnnamedFunction = builder.addFunction(undefined, kSig_l_v)
.addBody([kExprCallFunction, kRet57Function])
.index;
let kRet0Function = builder.addFunction('ret_0', kSig_f_v)
.addBody(wasmF32Const(0))
.exportFunc()
.index;
let kRet1Function = builder.addFunction('ret_1', kSig_d_v)
.addBody(wasmF64Const(1))
.exportFunc()
.index;
let kIdentityFunction = builder.addFunction('identity', kSig_i_i)
.addBody([kExprLocalGet, 0])
.exportFunc()
.index;
let kCallIdentityFunction = builder.addFunction('call_identity', kSig_i_v)
.addBody([
kExprI32Const, 42, // -
kExprCallFunction, kIdentityFunction // -
])
.exportFunc()
.index;
builder.addFunction('main', kSig_v_v)
.addBody([
kExprCallFunction, kCall23Function, kExprDrop, // -
kExprCallFunction, kUnnamedFunction, kExprDrop, // -
kExprCallFunction, kRet0Function, kExprDrop, // -
kExprCallFunction, kRet1Function, kExprDrop, // -
kExprCallFunction, kCallIdentityFunction, kExprDrop // -
])
.exportAs('main');
let instance = builder.instantiate();
instance.exports.main();