-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Serialize fewer archetypes and tidy up casts #7139
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
Serialize fewer archetypes and tidy up casts #7139
Conversation
Storing this separately is unnecessary since we already serialize the enum element's interface type. Also, this eliminates one of the few remaining cases where we serialize archetypes during AST serialization.
…eBase}::getKind() Also add some FIXMEs for some code in debug info emission that looks incorrect.
@swift-ci Please smoke test |
/// LValues, inout args, and Archetypes are implicitly indirect by | ||
/// virtue of their DWARF type. | ||
// | ||
// FIXME: Should this check if the lowered SILType is address only |
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.
@adrian-prantl What do you think? Should we be checking the SIL type lowering instead?
Also class-bound archetypes are not passed indirectly, so it's wrong in that case too.
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.
Yes, please go ahead.
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 can I construct a test case to verify my hypothesis? I don't want to start blindly changing this stuff without understanding what's going on :)
@@ -3278,9 +3278,13 @@ void IRGenSILFunction::visitDebugValueAddrInst(DebugValueAddrInst *i) { | |||
auto RealType = SILTy.getSwiftType(); | |||
// Unwrap implicitly indirect types and types that are passed by | |||
// reference only at the SIL level and below. | |||
// | |||
// FIXME: Should this check if the lowered SILType is address only |
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.
@adrian-prantl Ditto
@swift-ci Please smoke test Linux |
Previously, hasArgumentType() would silently return false if the EnumElementDecl had not yet been typechecked, but now, getArgumentInterfaceType() asserts in this case. As the FIXME comment suggests, this warrants further investigation, but for now add the workaround.
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
No description provided.