forked from WebAssembly/binaryen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EH] Rename option/pass names for new EH (exnref) (WebAssembly#6592)
We settled on the name `WASM_EXNREF` for the new setting in Emscripten for the name for the new EH option. https://github.com/emscripten-core/emscripten/blob/2bc5e3156f07e603bc4f3580cf84c038ea99b2df/src/settings.js#L782-L786 "New EH" sounds vague and I'm not sure if "experimental" is really necessary anyway, given that the potential users of this option is aware that this is a new spec that has been adopted recently. To make the option names consistent, this renames `--translate-to-eh` (the option that only runs the translator) to `--translate-to-exnref`, and `--experimental-new-eh` to `--emit-exnref` (the option that runs the translator at the end of the whole pipeline), and renames the pass and variable names in the code accordingly as well. In case anyone is using the old option names (and also to make the Chromium CI pass), this does not delete the old options.
- Loading branch information
Showing
9 changed files
with
68 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
;; When given alone, --emit-exnref just runs --translate-to-exnref | ||
;; RUN: wasm-opt %s -all --translate-to-exnref -S -o %t1.wasm | ||
;; RUN: wasm-opt %s -all --emit-exnref -S -o %t2.wasm | ||
;; RUN: diff %t1.wasm %t2.wasm | ||
|
||
;; When given with other flags, --emit-exnref runs the translator after running | ||
;; other passes. If --optimize-level >=3, --experimenal-new-eh also runs StackIR | ||
;; (+ local2stack) optimization. So running '-O --emit-exnref' should be the | ||
;; same as running all these passes separately. | ||
;; RUN: wasm-opt %s -all -O --translate-to-exnref --optimize-level=3 --generate-stack-ir --optimize-stack-ir -o %t1.wasm | ||
;; RUN: wasm-opt %s -all -O --emit-exnref -o %t2.wasm | ||
;; RUN: diff %t1.wasm %t2.wasm | ||
|
||
(module | ||
(import "env" "foo" (func $foo)) | ||
(start $test) | ||
(func $test | ||
(try $l | ||
(do | ||
(call $foo) | ||
) | ||
(catch_all | ||
(call $foo) | ||
(rethrow $l) | ||
) | ||
) | ||
) | ||
) |
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
test/lit/passes/translate-to-new-eh.wast → test/lit/passes/translate-to-exnref.wast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters