Skip to content

Commit

Permalink
Rewrite lint passes with less visitor cruft
Browse files Browse the repository at this point in the history
This purges about 500 lines of visitor cruft from lint passes. All lints are
handled in a much more sane way at this point. The other huge bonus of this
commit is that there are no more @-boxes in the lint passes, fixing the 500MB
memory regression seen when the lint passes were refactored.

Closes #8589
  • Loading branch information
alexcrichton committed Oct 3, 2013
1 parent ccd9a96 commit c0388cd
Show file tree
Hide file tree
Showing 3 changed files with 423 additions and 926 deletions.
4 changes: 2 additions & 2 deletions src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,13 +880,13 @@ fn encode_side_tables_for_ii(ecx: &e::EncodeContext,
// Because the ast visitor uses @IdVisitingOperation, I can't pass in
// ecx directly, but /I/ know that it'll be fine since the lifetime is
// tied to the CrateContext that lives throughout this entire section.
ast_util::visit_ids_for_inlined_item(ii, @SideTableEncodingIdVisitor {
ast_util::visit_ids_for_inlined_item(ii, &SideTableEncodingIdVisitor {
ecx_ptr: unsafe {
cast::transmute(ecx)
},
new_ebml_w: new_ebml_w,
maps: maps,
} as @ast_util::IdVisitingOperation);
});
ebml_w.end_tag();
}

Expand Down
Loading

5 comments on commit c0388cd

@bors
Copy link
Contributor

@bors bors commented on c0388cd Oct 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from thestinger
at alexcrichton@c0388cd

@bors
Copy link
Contributor

@bors bors commented on c0388cd Oct 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/lint = c0388cd into auto

@bors
Copy link
Contributor

@bors bors commented on c0388cd Oct 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/lint = c0388cd merged ok, testing candidate = 9344e2a

@bors
Copy link
Contributor

@bors bors commented on c0388cd Oct 3, 2013

@bors
Copy link
Contributor

@bors bors commented on c0388cd Oct 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9344e2a

Please sign in to comment.