Skip to content

Switch back to the old mangling for ObjC runtime names. #9228

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 3 commits into from
May 3, 2017

Conversation

eeckstein
Copy link
Contributor

To be backward compatible to existing archives created by the NSKeyedArchiver

@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@slavapestov
Copy link
Contributor

What so we need the old remangler for?

@slavapestov
Copy link
Contributor

Instead of using the old remangler to remangle the name, can we directly construct the old name? It should be a non-generic class so there are only a couple of cases to handle, and it's a lot less new code.

@eeckstein
Copy link
Contributor Author

@slavapestov No, we also do it for generic classes at runtime. And for that we need the re-mangler.
What we could do is to remove the code for all nodes which are not really created in the node tree.

@slavapestov
Copy link
Contributor

slavapestov commented May 3, 2017

That is really unfortunate. I recently added two new node kinds. What will the old remangler do if they appear in the tree?

@eeckstein
Copy link
Contributor Author

It's not that unfortunate because it's only a temporary thing. We'll remove the old remangler again.

What will the oldnremangler do if they appear in the tree?

The old remangler will not compile.
But as I said, we could just support the nodes which are really created at runtime. This needs some refactoring. But then adding new nodes will not require changes in the old remangler.

eeckstein added 3 commits May 3, 2017 10:52
To be backward compatible to existing archives created by the NSKeyedArchiver
…ted at runtime.

To be backward compatible to existing archives created by the NSKeyedArchiver for generic classes
Check that we can read an archive which was produced with the swift 3.1 compiler
@eeckstein eeckstein force-pushed the old-objc-type-mangling branch from 3cc3c4a to ddecb64 Compare May 3, 2017 17:53
@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

1 similar comment
@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit aad0baf into swiftlang:master May 3, 2017
@eeckstein eeckstein deleted the old-objc-type-mangling branch May 3, 2017 19:18
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