-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[WebAssembly] Rename CATCH/CATCH_ALL to *_LEGACY #107187
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
Merged
Merged
Conversation
This file contains hidden or 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 renames MIR instruction `CATCH` and `CATCH_ALL` to `CATCH_P3` and `CATCH_ALL_P3` respectively. `P3` means Phase 3. Follow-up PRs for the new EH (exnref) implementation will use `CATCH`, `CATCH_REF`, `CATCH_ALL`, and `CATCH_ALL_REF` as pseudo-instructions that return extracted values or `exnref` or both, because we don't currently support block return values in LLVM. So to give the old (real) `CATCH`es and the new (pseudo) `CATCH`es different names, this attaches `_P3` prefix to the names. This is what we did in Binaryen, but in this case they were `enum` values: https://github.com/WebAssembly/binaryen/blob/952286421a19fb8358d645f49d455b75bfbd1d19/src/wasm-binary.h#L1111-L1112 This also rearranges `WebAssemblyInstrControl.td` so that the old Phase 3 instructions are listed all together at the end.
I wonder if "CATCH_LEGACY" is a better name, since we settled on "legacy exception handling" as the name in the spec? |
Yeah that sounds better. Changed the code to |
aheejin
added a commit
to aheejin/binaryen
that referenced
this pull request
Sep 4, 2024
This renames `Catch(All)_P3` enum to denote the old Phase 3 `catch(_all)` instructions to `Catch(All)_Legacy`, which sounds clearer. This is also to be consistent with llvm/llvm-project#107187.
dschuff
approved these changes
Sep 4, 2024
Co-authored-by: Derek Schuff <[email protected]>
aheejin
added a commit
to WebAssembly/binaryen
that referenced
this pull request
Sep 4, 2024
This renames `Catch(All)_P3` enum to denote the old Phase 3 `catch(_all)` instructions to `Catch(All)_Legacy`, which sounds clearer. This is also to be consistent with llvm/llvm-project#107187.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This renames MIR instruction
CATCH
andCATCH_ALL
toCATCH_LEGACY
andCATCH_ALL_LEGACY
respectively.Follow-up PRs for the new EH (exnref) implementation will use
CATCH
,CATCH_REF
,CATCH_ALL
, andCATCH_ALL_REF
as pseudo-instructions that return extracted values orexnref
or both, because we don't currently support block return values in LLVM. So to give the old (real)CATCH
es and the new (pseudo)CATCH
es different names, this attaches_LEGACY
prefix to the old names.This also rearranges
WebAssemblyInstrControl.td
so that the old legacy instructions are listed all together at the end.