Skip to content

Commit

Permalink
Bug 1817343 [wpt PR 38561] - [wasm] Exception -> Tag in basic.tentati…
Browse files Browse the repository at this point in the history
…ve.any.js, a=testonly

Automatic update from web-platform-tests
[wasm] Exception -> Tag in basic.tentative.any.js

This need to change in order to work with #38549, which merged
WebAssembly/exception-handling#252.

--

wpt-commits: cde25e7e3c3b9d2280eb088a3fb9da988793d255
wpt-pr: 38561
  • Loading branch information
aheejin authored and moz-wptsync-bot committed Mar 2, 2023
1 parent 0fd1900 commit bc621a1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ promise_test(async () => {
const kWasmAnyRef = 0x6f;
const kSig_v_r = makeSig([kWasmAnyRef], []);
const builder = new WasmModuleBuilder();
const except = builder.addException(kSig_v_r);
const tagIndex = builder.addTag(kSig_v_r);
builder.addFunction("throw_param", kSig_v_r)
.addBody([
kExprLocalGet, 0,
kExprThrow, except,
kExprThrow, tagIndex,
])
.exportFunc();
const buffer = builder.toBuffer();
Expand All @@ -45,11 +45,11 @@ promise_test(async () => {

promise_test(async () => {
const builder = new WasmModuleBuilder();
const except = builder.addException(kSig_v_a);
const tagIndex = builder.addTag(kSig_v_a);
builder.addFunction("throw_null", kSig_v_v)
.addBody([
kExprRefNull, kWasmAnyFunc,
kExprThrow, except,
kExprThrow, tagIndex,
])
.exportFunc();
const buffer = builder.toBuffer();
Expand All @@ -59,11 +59,11 @@ promise_test(async () => {

promise_test(async () => {
const builder = new WasmModuleBuilder();
const except = builder.addException(kSig_v_i);
const tagIndex = builder.addTag(kSig_v_i);
builder.addFunction("throw_int", kSig_v_v)
.addBody([
...wasmI32Const(7),
kExprThrow, except,
kExprThrow, tagIndex,
])
.exportFunc();
const buffer = builder.toBuffer();
Expand All @@ -74,12 +74,12 @@ promise_test(async () => {
promise_test(async () => {
const builder = new WasmModuleBuilder();
const fnIndex = builder.addImport("module", "fn", kSig_v_v);
const except = builder.addException(kSig_v_r);
const tagIndex= builder.addTag(kSig_v_r);
builder.addFunction("catch_exception", kSig_r_v)
.addBody([
kExprTry, kWasmStmt,
kExprCallFunction, fnIndex,
kExprCatch, except,
kExprCatch, tagIndex,
kExprReturn,
kExprEnd,
kExprRefNull, kWasmAnyRef,
Expand Down

0 comments on commit bc621a1

Please sign in to comment.