-
Notifications
You must be signed in to change notification settings - Fork 786
Make pops valid in tests #3282
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
Make pops valid in tests #3282
Conversation
These two tests had pops in invalid locations; pops are valid only after `catch`. This fixes those invalid wasm files. This leaves only one test file with invalid pops: https://github.com/WebAssembly/binaryen/blob/master/test/passes/Os_print-stack-ir_all-features.wast But I'm not sure if we can remove this now, because this tests pops for different types of values than `exnref`. I guess we can fix it after we implement the new spec for EH, which removes `exnref` and there `catch` can extract other types of values.
@@ -1273,7 +1273,6 @@ | |||
(try | |||
(do | |||
;; Expressions that can throw should NOT be taken out of 'try' scope. | |||
(local.set $exn (pop exnref)) |
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.
I'm not sure why we had this line here; I think this was a copy-paste error.
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.
LGTM, but for what it's worth, I would also be fine just deleting these parts of the tests. They are from back when I originally added Pop with the idea that it could be used anywhere (along with Push, which we've since removed).
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.
lgtm.
Removing them would be even better, but I'm not sure myself if these don't help somehow. If you you think it's ok to remove then sgtm.
These two tests had pops in invalid locations; pops are valid only after
catch
. This fixes those invalid wasm files.This removes pops from Os_print-stack-ir_all-features.wast too.
Fixes #3213 and #3283.