Skip to content

Commit

Permalink
[wasm] Exception -> Tag in basic.tentative.any.js
Browse files Browse the repository at this point in the history
This need to change in order to work with #38549, which merged
WebAssembly/exception-handling#252.
  • Loading branch information
aheejin authored and marcoscaceres committed Mar 28, 2023
1 parent 3e60f46 commit 7f10c42
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions wasm/jsapi/exception/basic.tentative.any.js
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 7f10c42

Please sign in to comment.