-
Notifications
You must be signed in to change notification settings - Fork 747
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
[Parser] Parse tags and throw #6126
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
d583b60
to
687b078
Compare
When branches target control flow structures other than blocks or loops, the IRBuilder wraps those control flow structures with an extra block for the branches to target in Binaryen IR. Usually that block has the same type as the control flow structure it wraps, but when the control flow structure is unreachable because all its bodies are unreachable, the wrapper block may still need to have a non-unreachable type if it is targeted by branches. Previously the wrapper block would also be unreachable in that case. Fix the bug by tracking whether the wrapper block will be targeted by any branches and use the control flow structure's original, non-unreachable type if so.
Also fix the parser to correctly error if an imported item appears after a non-imported item and make the corresponding fix to the test.
687b078
to
be8295c
Compare
;; CHECK-NEXT: ) | ||
;; CHECK-NEXT: ) | ||
(func $throw | ||
throw 2 |
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.
How did throw de bruijn 2 become $1?
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.
talked offline: not a de bruijn idx, but a tag idx.
Also fix the parser to correctly error if an imported item appears after a non-imported item and make the corresponding fix to the test.
Also fix the parser to correctly error if an imported item appears after a
non-imported item and make the corresponding fix to the test.