Skip to content

Preparations for special names #9967

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

Closed

Conversation

jrose-apple
Copy link
Contributor

#8053, rebased on @ahoppen's behalf.

This is a big change, splitting Identifier out into Identifier and DeclBaseName in preparation for subscript (and eventually init and deinit) no longer being plain old identifiers. It's entirely possible Alex and I have changed something incorrectly here, picking either Identifier or DeclBaseName where the other would have been more appropriate. Still, this patch alone should not cause any regressions or changes in behavior; the only places where we have actually done something differently are in debugging output (usually a switch to print a full name instead of just a base name).

Special names will in the future represent names that don't have a
surface language identifier like subscript.

For this, change the backing type of DeclName to a new type DeclBaseName
that will later be able to represent special names.

ValueDecls may therefore no longer have an identifier name. Thus we move
the getName method from ValueDecl to the subtypes that are guaranteed
to have identifier names.

Since special names have not been introduced yet, TODOs are left where
handling of these will most likely be necessary. Furthermore the
SwiftLookupTable will needs to be changed to handle special names.
@jrose-apple
Copy link
Contributor Author

I'm moving forward with this now because I want it to be easy to cherry-pick things from the master branch to the 4.0 branch.

apple/swift-lldb#165
@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

Whoops, I may have misunderstood the purpose of Alex's newer patches. We might have a more incremental version to land instead.

@jrose-apple jrose-apple deleted the preparation-declname branch May 29, 2017 16:24
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