Skip to content

Remove imported reflection field descriptors #20235

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

Conversation

slavapestov
Copy link
Contributor

Right now we expect that every class and protocol has a field
descriptor that tells us if the entity is @objc or not.

For imported types, the descriptor will not exist if we did not
directly emit a field whose concrete type contains the imported
type. For example, in lldb, we might have a generic type whose
runtime substituted type includes an imported type.

In this case, TypeLowering would fail to produce a layout because
it did not find a field descriptor for the imported type.

A better approach is to have the TypeDecoder call a different
factory method for imported types, and handle them specially in
TypeLowering, bypassing the field type metadata altogether.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2018

Build failed
Swift Test Linux Platform
Git Sha - d6068f4c78b31da72ea20c1ad9b4f7577a225ed8

@slavapestov slavapestov force-pushed the remove-imported-reflection-field-descriptors branch from d6068f4 to b85a115 Compare November 2, 2018 04:24
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2018

Build failed
Swift Test OS X Platform
Git Sha - d6068f4c78b31da72ea20c1ad9b4f7577a225ed8

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2018

Build failed
Swift Test Linux Platform
Git Sha - b85a11522ea4dad29c3580f60fa922c38e2371dd

…r own TypeRef

Right now we expect that every class and protocol has a field
descriptor that tells us if the entity is @objc or not.

For imported types, the descriptor will not exist if we did not
directly emit a field whose concrete type contains the imported
type. For example, in lldb, we might have a generic type whose
runtime substituted type includes an imported type.

In this case, TypeLowering would fail to produce a layout because
it did not find a field descriptor for the imported type.

A better approach is to have the TypeDecoder call a different
factory method for imported types, and handle them specially in
TypeLowering, bypassing the field type metadata altogether.
…try point

This will eventually replace swift::ide::getTypeFromMangledSymbolname().
@slavapestov slavapestov force-pushed the remove-imported-reflection-field-descriptors branch from b85a115 to 9074136 Compare November 2, 2018 04:47
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2018

Build failed
Swift Test OS X Platform
Git Sha - b85a11522ea4dad29c3580f60fa922c38e2371dd

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2018

Build failed
Swift Test Linux Platform
Git Sha - b85a11522ea4dad29c3580f60fa922c38e2371dd

@slavapestov
Copy link
Contributor Author

@dcci Check out the last commit...

@slavapestov slavapestov merged commit 4c475e6 into swiftlang:master Nov 2, 2018
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