Skip to content

Class resilience part 2 #13297

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 6, 2017

Conversation

slavapestov
Copy link
Contributor

Two things here:

  • First, an NFC refactoring to metadata emission, which will be important later.

  • Second, moving some stuff to before the address point in generic class metadata. The dependent data area and field type vector slot are not ABI, but rather private storage used by the generic instantiation function and the field type vector function, respectively. By moving them before the address point, we ensure that the tail end of a generic class template, after the Objective-C area, consists entirely of null pointers. In a future patch, they can be omitted entirely.

More importantly, this means that for a class with a resilient base class, it suffices to initialize the tail area with the right size at runtime, without having to perform any kind of "sliding" of the dependent data.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov requested a review from rjmccall December 6, 2017 05:12
@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2017

Build failed
Swift Test Linux Platform
Git Sha - d080c76d25162e239a8ed2ece7fdaed71e1f6d35

@slavapestov slavapestov force-pushed the class-resilience-part-2 branch from d080c76 to 6667ad3 Compare December 6, 2017 05:34
@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 6, 2017

Build failed
Swift Test Linux Platform
Git Sha - d080c76d25162e239a8ed2ece7fdaed71e1f6d35

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2017

Build failed
Swift Test OS X Platform
Git Sha - d080c76d25162e239a8ed2ece7fdaed71e1f6d35

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 9a5df02 into swiftlang:master Dec 6, 2017
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.

2 participants