-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[EH] Add new test setting for new Wasm EH #21906
Conversation
`with_all_eh_sjlj` and `with_all_sjlj` decorators (previously `with_both_eh_sjlj` and `with_both_sjlj` but recently got renamed) currently tests two modes: Emscripten EH and Wasm EH (pre-2023). We decided to switch to a new version of the Wasm EH proposal in Oct 2023, so this adds a new test setting for the new Wasm EH proposal in those decorators. Currently we have two parameters: - ``: Emscripten EH - `wasm`: Wasm EH (pre-2023) This changes it to these three parameters: - `emscripten`: Emscripten EH - `wasm`: Wasm EH (pre-2023) - `new_wasm`: Wasm EH (New proposal adopted on Oct 2023) To use the new mode in the command line, you use `-fwasm-exceptions` as in the old Wasm EH, but add `-sEXPERIMENTAL_NEW_WASM_EXCEPTIONS` additionally. This currently uses the Binaryen translator that translates old Wasm EH instruction to the new ones (https://github.com/WebAssembly/binaryen/blob/main/src/passes/TranslateEH.cpp) at the end of the Binaryen pipeline to produce new binaries.
The CI will pass once llvm/llvm-project#91299 rolls into Chromium CI. |
Sorry to bikeshed the naming, but I think a name that describes the feature itself is better than just describing it in relation to the other feature (e.g. |
otherwise LGTM though. |
test/common.py
Outdated
# - Emscripten EH + Emscripten SjLj | ||
# - Wasm EH + Wasm SjLj | ||
# - Wasm EH + Wasm SjLj (Phase 3, to be deprecated) | ||
# - Wasm EH _ Wasm SjLj (New, experimental) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does _
mean here? (after "EH ")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to type +
... Will fix.
My thought was mostly that this new mode will be merged into |
True; although the timeline for how long this option will have to exist is pretty unclear. Most users aren't going to want to use exnref until it has been supported in all browsers for quite a while, so even if exnref went to phase 4 tomorrow, I expect it to be at least a year until we would think about making exnref the default behavior for fwasm-exceptions. But in the meantime there will be 2 options that coexist. |
Changed the option name to |
The testing mode for the new Wasm EH (exnref) was added in `with_all_eh_sjlj` and `with_all_sjlj` in emscripten-core#21906. But this adds the new Wasm EH test mode for more tests that are not covered by those decorators.
The testing mode for the new Wasm EH (exnref) was added in `with_all_eh_sjlj` and `with_all_sjlj` in #21906. But this adds the new Wasm EH test mode for more tests that are not covered by those decorators.
with_all_eh_sjlj
andwith_all_sjlj
decorators (previouslywith_both_eh_sjlj
andwith_both_sjlj
but recently got renamed) currently tests two modes: Emscripten EH and Wasm EH (pre-2023). We decided to switch to a new version of the Wasm EH proposal in Oct 2023, so this adds a new test setting for the new Wasm EH proposal in those decorators.Currently we have two parameters:
wasm
: Wasm EH (pre-2023)This changes it to these three parameters:
emscripten
: Emscripten EHwasm
: Wasm EH (pre-2023)wasm_exnref
: Wasm EH (New proposal adopted on Oct 2023)To use the new mode in the command line, you use
-fwasm-exceptions
as in the old Wasm EH, but add-sWASM_EXNREF
additionally.This currently uses the Binaryen translator that translates old Wasm EH instruction to the new ones
(https://github.com/WebAssembly/binaryen/blob/main/src/passes/TranslateEH.cpp) at the end of the Binaryen pipeline to produce new binaries.