Remove many shared pointers
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
This commit is contained in:
parent
0bad3e62b4
commit
7295a6da92
50 changed files with 388 additions and 427 deletions
|
@ -644,7 +644,7 @@ pub fn core_macros() -> @str {
|
|||
}
|
||||
|
||||
pub fn expand_crate(parse_sess: @mut parse::ParseSess,
|
||||
cfg: ast::crate_cfg, c: @crate) -> @crate {
|
||||
cfg: ast::crate_cfg, c: &crate) -> @crate {
|
||||
// adding *another* layer of indirection here so that the block
|
||||
// visitor can swap out one exts table for another for the duration
|
||||
// of the block. The cleaner alternative would be to thread the
|
||||
|
@ -695,7 +695,7 @@ pub fn expand_crate(parse_sess: @mut parse::ParseSess,
|
|||
// as it registers all the core macros as expanders.
|
||||
f.fold_item(cm);
|
||||
|
||||
@f.fold_crate(&*c)
|
||||
@f.fold_crate(c)
|
||||
}
|
||||
|
||||
// given a function from idents to idents, produce
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue