Skip to content

fix(runtime): Lookup into native MD tables when searching by name #1218

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 1 commit into from
Nov 5, 2019

Conversation

mbektchiev
Copy link
Contributor

@mbektchiev mbektchiev commented Nov 1, 2019

Querying metadata for Objective-C interfaces and protocols should
not be done by the JS name when the string we search for is actually
their native name

  • Introduce 2 additional global tables in metadata for Interfaces and Protocols
    indexed by their native name
  • Make Metadata::GlobalTable a template struct and move its implementation
    to MetadataInlines.h
  • Use the correct global table depending on the name and entity being looked up
  • Add unit test with an objc_runtime_name attribute emulating that it's been
    generated by the Swift compiler

PR Checklist

refs #712

Querying metadata for Objective-C interfaces and protocols should
not be done by the JS name when the string we search for is actually
their native name

* Introduce 2 additional global tables in metadata for Interface and Protocols
by  indexed by their native name
* Make `Metadata::GlobalTable` a template struct and move its implementation
to `MetadataInlines.h`
* Use the correct global table depending on the name and entity being looked up
* Add unit test with an `objc_runtime_name` attribute emulating that it's been
generated by the Swift compiler
@mbektchiev mbektchiev added the bug label Nov 1, 2019
@mbektchiev mbektchiev added this to the 6.3.0 milestone Nov 1, 2019
@mbektchiev mbektchiev requested a review from vmutafov November 1, 2019 14:04
@mbektchiev mbektchiev self-assigned this Nov 1, 2019
@cla-bot cla-bot bot added the cla: yes label Nov 1, 2019
@mbektchiev mbektchiev merged commit c9c13b9 into master Nov 5, 2019
@mbektchiev mbektchiev deleted the bektchiev/demangle-swift-class-names branch November 5, 2019 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants