-
Notifications
You must be signed in to change notification settings - Fork 831
Remove exnref and br_on_exn #3505
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
Conversation
This removes `exnref` type and `br_on_exn` instruction.
| double f64; | ||
| uint8_t v128[16]; | ||
| const char* func; | ||
| // TODO: exn |
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.
a nice way to resolve a TODO 😆
| bool operator!=(const ExceptionPackage& other) const { | ||
| return !(*this == other); | ||
| } | ||
| }; |
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.
Would this not be useful in the new exceptions code (maybe with changes)? (whatever is easier for you sgtm)
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.
It's moved here in #3498:
binaryen/src/wasm-interpreter.h
Lines 43 to 47 in 7a83bc7
| struct WasmException { | |
| Name event; | |
| Literals values; | |
| }; | |
| std::ostream& operator<<(std::ostream& o, const WasmException& exn); |
Previously WasmException was just a wrapper that contains a Literal of type exnref which contains a unique_ptr to ExceptionPackage which contains Name event and Literals values. Now that we don't have a exnref type Literal, I removed all those layers and WasmException directly contains the contents, which will be used only within ExpressionRunner hierarchy.
So far I haven't needed == and != operators there. I can add them if they become necessary.
This removes
exnreftype andbr_on_exninstruction.