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
Add string parameter to WASM_UNREACHABLE #2499
Conversation
I'm not sure why this was disabled in the first place. If we want more information from WASM_UNREACHABLE to be preserved even in release builds I could do that as a followup to #2499.
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 do you think about switching from the WASM_ prefix to a BYN_ prefix? Also cc @kripken for that question.
Yeah, I was going to do that too.. maybe lets do that as a followup and we can do it for all the macros in binaryen? |
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.
There's a slight regression here in that the messages can no longer print any information about local variables, but that seems acceptable because these don't trigger unless more debugging is needed anyway.
They can, but you have to jump through hoops a little bit |
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.
Another step in the LLVM-ification of Binaryen ;)
|
This works more like llvm's unreachable handler in that is preserves information even in release builds (where asserts are disabled). Right now binaryen always builds with asserts on, even in release builds mains so that WASM_UNREACHABLE can report useful information. However with this new method we can turn on asserts and still have WASM_UNREACHABLE be useful.
This works more like llvm's unreachable handler.