-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
stage2: astgen for try
#7606
stage2: astgen for try
#7606
Conversation
Wow, everything is coming together. I was just thinking about how to implement inferred error sets yesterday. Both of these issues stem from that. The call that checks if the errorset matches the return type is this: https://github.com/ziglang/zig/pull/7606/files#diff-2600885f5a9e88bc263d2b47daab6d1c33418966af8f42b26c188597c108201bR930-R940 I think since I will probably also be implementing inferred error sets soon, I will keep this in the back of my head. If these bugs were to happen, they would not happen in astgen for |
We'll see. |
…n e;` except without the overhead of a local var
44f75a2
to
af870ed
Compare
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'd like to get orelse/catch hooked up all the way through the compiler with test coverage before adding more astgen that uses similar logic, to make sure we are going in the right direction here.
I would too, #7628 will do that, then we can look at this.
…On Mon Jan 18, 2021 at 7:29 AM EST, Andrew Kelley wrote:
@andrewrk requested changes on this pull request.
I'd like to get orelse/catch hooked up all the way through the compiler
with test coverage before adding more astgen that uses similar logic, to
make sure we are going in the right direction here.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#7606 (review)
|
This PR will have to be re-done now that #7847 is landed. |
I used
orelseCatchExpr
as inspiration for most of thetryExpr
function. This is my first astgen expr, so please tell me if something is not idomatic.I also moved the -femit-zir code higher up in the
updateModule
function so that even if sema fails, you still get the ir in $file.zir.I couldn't find a way to test this.