You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggest the minimal type disambiguation when an overload doesn't have any unique types (#1087)
* Suggested only the minimal type disambiguation
rdar://136207880
* Support disambiguating using a mix of parameter types and return types
* Skip checking columns that are common for all overloads
* Use Swift Algorithms package for combinations
* Use specialized Set implementation for few overloads and with types
* Allow each Int Set to specialize its creation of combinations
* Avoid mapping combinations for large sizes to Set<Int>
* Avoid reallocations when generating "tiny int set" combinations
* Avoid indexing into a nested array
* Speed up _TinySmallValueIntSet iteration
* Avoid accessing a Set twice to check if a value exist and remove it
* Avoid temporary allocation when creating set of remaining node IDs
Also, ignore "sparse" nodes (without IDs)
* Avoid reallocating the collisions list
* Use a custom `_TinySmallValueIntSet.isSuperset(of:)` implementation
* Use `Table<String>` instead of indexing into `[[String]]`
* Avoid recomputing the type name combinations to check
* Compare the type name lengths by number of UTF8 code units
* Update code comments, variable names, and internal documentation
* Avoid recomputing type name overlap
* Fix Swift 5.9 compatibility
* Initialize each `Table` element. Linux requires this.
* Address code review feedback:
- Use plural for local variable with array value
- Explicitly initialize optional local variable with `nil`
- Add assert about passing empty type names
- Explain what `nil` return value means in local code comment
- Add comment indicating where `_TinySmallValueIntSet` is defined
- Use + to join two string instead of string interpolation
- Use named arguments for `makeDisambiguation` closure
* Add detailed comment with example about how to find the fewest type names that disambiguate an overload
* Don't use swift-algorithm as a _local_ dependency in Swift.org CI
* Add additional test for 70 parameter type disambiguation
* Add additional test that overloads with all the same parameters fallback to hash disambiguation
* Remove Swift Algorithms dependency.
For the extremely rare case of overloads with more than 64 parameters we only try disambiguation by a single parameter type name.
* Only try mixed type disambiguation when symbol has both parameters and return value
0 commit comments