-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Support closured vars inside Const initializer #10478
Conversation
Seems the alpine build failing is pre-existing, the windows build failing is ??? I think I should not test |
This is great! I think if we name it def instead of fake def then it's much better. That is, this is the correct solution, not a temporary one. |
I'd prefer to name it this way, since it is a fake def, the function it refers to never gets defined, and does not exist in the program. The |
I see. Yeah, that makes sense. |
A more complete refactor I think would make the proc initializers actual |
I'd say the windows failure is an actual bug. The CONST value should really be |
@straight-shoota I think the values here are not actual At least, without doing some unsafe memory wrangling. |
In llvm, |
Yeah, |
Just to further make sure that that spec is correct: https://carc.in/#/r/aibt |
Okay 👍 Then maybe the spec could check |
done! |
bump? |
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.
Looks good, thank you!
I still think fake_def
should be just renamed to def
. It doesn't matter if it's "fake" or that we fake it: in the end we end up kind of creating a def for it. But this rename get to into a later PR if needed.
Probably isn't the cleanest fix, but this solves it with the least changes.
I found another bug with const initializer codegen while I was solving this, that's why there's 2 commits.
Fixes #10474 .