Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js-api] Update wasm-module-builder.js for exnref #314

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Jun 21, 2024

This pulls in some exnref-related changes from
https://github.com/v8/v8/blob/main/test/mjsunit/wasm/wasm-module-builder.js but does not sync with it completely. That v8 version contains a lot of features from new proposals that are not really relevant to EH and exnref, so this pulls only the relevant EH parts in.

This also renames kWasmStmt to kWasmVoid as in the V8 version, because it looks more intuitive. Also renames kTagAttribute to kExceptionAttribute.

This pulls in some exnref-related changes from
https://github.com/v8/v8/blob/main/test/mjsunit/wasm/wasm-module-builder.js
but does not sync with it completely. That v8 version contains a lot of
features from new proposals that are not really relevant to EH and
exnref, so this pulls only the relevant EH parts in.

This also renames `kWasmStmt` to `kWasmVoid` as in the V8 version,
because it looks more intuitive. Also renames `kTagAttribute` to
`kExceptionAttribute`.
@aheejin aheejin requested review from Ms2ger and dschuff June 21, 2024 23:00
@@ -217,10 +221,9 @@ let kExprIf = 0x04;
let kExprElse = 0x05;
let kExprTry = 0x06;
let kExprCatch = 0x07;
let kExprCatchAll = 0x19;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These old instructions were not deleted; they were just moved below to maintain the sorted order of opcodes.

(This is not actually the same as what v8 file does; it refactored the old opcodes into a list, which I didn't pull in here: https://github.com/v8/v8/blob/8b52e5f026dc859cab827ec584f3eedbc0510459/test/mjsunit/wasm/wasm-module-builder.js#L261-L463. But the sorted order is maintained in this list too.)

@aheejin aheejin merged commit 2f5a7c5 into main Jun 25, 2024
2 checks passed
@aheejin aheejin deleted the module_builder branch June 25, 2024 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants