Skip to content
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

Merged
merged 1 commit into from
Jul 30, 2016

Conversation

michaelwoerister
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

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?
Copy link
Contributor

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.

Copy link
Member Author

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.

@bors
Copy link
Contributor

bors commented Jul 29, 2016

☔ The latest upstream changes (presumably #34956) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb
Copy link
Member

eddyb commented Jul 29, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Jul 29, 2016

📌 Commit 415fde4 has been approved by eddyb

@alexcrichton
Copy link
Member

@bors: rollup

assuming this isn't very platform-specific and green travis means it's good to go whenever

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 30, 2016
…tor, r=eddyb

intravisit: Fold functionality of IdVisitor into the regular Visitor.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 30, 2016
…tor, r=eddyb

intravisit: Fold functionality of IdVisitor into the regular Visitor.
bors added a commit that referenced this pull request Jul 30, 2016
Rollup of 8 pull requests

- Successful merges: #35049, #35058, #35063, #35080, #35090, #35094, #35104, #35106
- Failed merges:
@bors bors merged commit 415fde4 into rust-lang:master Jul 30, 2016
sanxiyn added a commit to sanxiyn/rust that referenced this pull request Aug 1, 2016
…-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.
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.

7 participants