Skip to content

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

Merged
merged 4 commits into from
Dec 8, 2017

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2017

Build failed
Swift Test OS X Platform
Git Sha - 959b6e7873bfe4b6f4a374e5667a8253b690a13f

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.
@slavapestov slavapestov force-pushed the class-resilience-part-3 branch from 959b6e7 to 5dcc6b1 Compare December 7, 2017 22:22
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2017

Build failed
Swift Test Linux Platform
Git Sha - 959b6e7873bfe4b6f4a374e5667a8253b690a13f

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2017

Build failed
Swift Test OS X Platform
Git Sha - 959b6e7873bfe4b6f4a374e5667a8253b690a13f

@slavapestov slavapestov merged commit 3866bd2 into swiftlang:master Dec 8, 2017
@slavapestov
Copy link
Contributor Author

@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);
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

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.

3 participants