Uh oh!
There was an error while loading. Please reload this page.
rustc_resolve: Refactor away NameBindings and ImportResolutionPerNamespace - #30843
Conversation
a778203 to
07df703Comparejseyfried
commented
Jan 13, 2016
I amended the commit to add a couple of comments and refactored some more code out of |
bors
commented
Jan 14, 2016
☔ The latest upstream changes (presumably #30883) made this pull request unmergeable. Please resolve the merge conflicts. |
043c4fd to
7f3f96aComparebors
commented
Jan 15, 2016
☔ The latest upstream changes (presumably #30929) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
commented
Jan 15, 2016
Sorry for the delay in reviewing this! Working on it. Been a crazy week. |
bors
commented
Jan 21, 2016
☔ The latest upstream changes (presumably #31010) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
commented
Jan 22, 2016
☔ The latest upstream changes (presumably #30882) made this pull request unmergeable. Please resolve the merge conflicts. |
708e175 to
6865bffComparejseyfried
commented
Jan 24, 2016
@nikomatsakis No hurry, those first two upstream changes were PRs I backported from this branch and the other two didn't interact with this PR that much. Let me know if you'd like me to explain, motivate, or justify the purity of anything in this refactoring. I also have a branch a commit ahead of this one (diff) where I refactor away |
nrc
commented
Jan 25, 2016
nikomatsakis
commented
Jan 25, 2016
@jseyfried as you can tell I still haven't gotten to it :) I hope to do so soon though. Last week was just a doozy. (The truth is, I don't know resolve as well as I would like, so your PRs always require me to read into the code quite a bit.) UPDATE: But it's good for me. :) |
petrochenkov
commented
Jan 26, 2016
|
jseyfried
commented
Jan 27, 2016
@petrochenkov good points, thanks. I implemented your suggestions in the third commit. |
petrochenkov
commented
Jan 27, 2016
jseyfried@521aaf2 reviewed, all the code seems to be moved correctly, it's hard to track though |
ab53df5 to
100a9f6Comparenikomatsakis
commented
Jan 28, 2016
OK, I feel pretty good about this change. @petrochenkov, your thoughts? |
petrochenkov
commented
Jan 28, 2016
resolve becomes 450 lines less scary, merge of course! |
bors
commented
Jan 29, 2016
☔ The latest upstream changes (presumably #31212) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
commented
Jan 29, 2016
OK, r=me after a rebase. Just for fun, I kicked off a crater run as well (resolve tends to be finicky). |
jseyfried
commented
Jan 29, 2016
rebased |
nikomatsakis
commented
Jan 30, 2016
Crater report shows zero regressions: https://gist.github.com/nikomatsakis/5181cff5cc53438ab82e |
nikomatsakis
commented
Jan 30, 2016
@bors r+ |
bors
commented
Jan 30, 2016
📌 Commit afd42d2 has been approved by |
bors
commented
Jan 30, 2016
⌛ Testing commit afd42d2 with merge 9ba9f0a... |
bors
commented
Jan 30, 2016
💔 Test failed - auto-mac-64-nopt-t |
alexcrichton
commented
Jan 30, 2016
@bors: retry On Fri, Jan 29, 2016 at 7:42 PM, bors notifications@github.com wrote:
|
bors
commented
Jan 30, 2016
⌛ Testing commit afd42d2 with merge 558fd51... |
bors
commented
Jan 30, 2016
💔 Test failed - auto-linux-cross-opt |
alexcrichton
commented
Jan 30, 2016
@bors: retry On Fri, Jan 29, 2016 at 8:48 PM, bors notifications@github.com wrote:
|
bors
commented
Jan 30, 2016
This commit refactors the field `Module::children` from mapping `Name` -> `NameBindings` to mapping `(Name, Namespace)` -> `NameBinding` and refactors the field `Module::import_resolutions` from mapping `Name` -> `ImportResolutionPerNamespace` to mapping `(Name, Namespace)` -> `ImportResolution`. This allows the duplicate checking code to be refactored so that `NameBinding` no longer needs ref-counting or a RefCell (removing the need for `NsDef`). r? @nikomatsakis
This commit refactors the field
Module::childrenfrom mappingName->NameBindingsto mapping(Name, Namespace)->NameBindingand refactors the fieldModule::import_resolutionsfrom mappingName->ImportResolutionPerNamespaceto mapping(Name, Namespace)->ImportResolution.This allows the duplicate checking code to be refactored so that
NameBindingno longer needs ref-counting or a RefCell (removing the need forNsDef).r? @nikomatsakis