-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
intravisit: Fold functionality of IdVisitor into the regular Visitor. #35090
Conversation
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -814,6 +861,7 @@ pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm) { | |||
} | |||
|
|||
pub fn walk_vis<'v, V: Visitor<'v>>(visitor: &mut V, vis: &'v Visibility) { | |||
// FIXME(mw): What is this NodeId in there? And should it be visited? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path in visibility pub(path)
has a resolution in def_map
keyed by this id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then we should visit it.
☔ The latest upstream changes (presumably #34956) made this pull request unmergeable. Please resolve the merge conflicts. |
fcee2ed
to
415fde4
Compare
@bors r+ |
📌 Commit 415fde4 has been approved by |
@bors: rollup assuming this isn't very platform-specific and green travis means it's good to go whenever |
…tor, r=eddyb intravisit: Fold functionality of IdVisitor into the regular Visitor.
…tor, r=eddyb intravisit: Fold functionality of IdVisitor into the regular Visitor.
…-map, r=eddyb Move caching of inlined HIR into CrateStore So far we've had separate HIR-inlining caches for each codegen unit and the caching for things inlined during constant evaluation had some holes. Consequently, things would be inlined multiple times if they were used from different codegen units, etc, leading to - wasted memory, - multiple `NodeId`s per `DefId` and, - for things inlined during constant evaluation, no way to map a `NodeId` back to it's original `DefId`. This PR moves all caching into the CrateStore, solving all of the above problems. It also fixes some bugs in the inlining code, like cyclic in the parent-chains in the HIR map and some `NodeId`'s being translated to more or less random values. There are assertions in place now that should prevent this kind of thing in the future. This PR based on top of rust-lang#35090, which contains some necessary fixes.
No description provided.