-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Class resilience part 3 #13312
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
Class resilience part 3 #13312
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
Instead of recording the current offset in the template, just collect the fill ops into a vector and emit them at the generic argument offset stored in the MetadataLayout. For now this is NFC, but this allows the template to omit entries for generic arguments entirely once some more machinery is in place.
959b6e7
to
5dcc6b1
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
Build failed |
@rjmccall I realized I forgot to tag you for review here as well. Let me know if anything looks suspect. |
/*vwtable=*/nullptr); | ||
emitInitializeFieldOffsetVector(IGF, loweredClassTy, | ||
metadata, | ||
/*vwtable=*/nullptr); |
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.
So we're assuming that the superclass has been relocated already. That's a nice simplification. The runtime will do this?
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.
And if so, presumably it can copy field offsets and generic arguments higher in the hierarchy, so we can strike that bit from the comment, 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.
The relocation is handled in the next PR ("part 4").
Copying field offsets and generic arguments from higher up in the hierarchy is already implemented by swift_initClassMetadata_UniversalStrategy()
, since we already have to do it for generic classes, where the generic arguments and field offsets are always just null in the template.
No description provided.