Skip to content
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 @errorCast not pop error return traces #23136

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

gooncreeper
Copy link

Fixes #20177

This is my first time really going deeper into the compiler, so please
spare me if I made some fatal mistake. I decided to tackle this one
since I can across it while debugging a project of mine, and thought it
would be a good place to get a foot in the water of the compiler
internals.

The actual patch to the bug is one line, which leads to
AstGen.callExpr having the proper value for propagate_error_trace.

Additionally, I made print_zir.writeCall print the
pop_error_return_trace value of function calls to help future
debugging.

As an extra goodie, I also refactored the type of
Zir.Flags.packed_modifier to directly use std.builtin.CallModifier,
removing all the messy casting. I did this since I saw the mess while
tracing down this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

using @errorCast destroys error return trace
1 participant