Pass all arguments by reference, make immut alias mode equiv to value
Arguments that can't be safely referenced will be implicitly copied. (Warnings for expensive copies will be forthcoming.) This will allow us to get rid of most of the ampersands in function signatures. See [1]. [1] https://mail.mozilla.org/pipermail/rust-dev/2011-September/000759.html
This commit is contained in:
parent
476bbca87a
commit
4be7e1e5cd
7 changed files with 188 additions and 158 deletions
|
|
@ -158,14 +158,14 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: &str,
|
|||
let mut_map =
|
||||
time(time_passes, "mutability checking",
|
||||
bind middle::mut::check_crate(ty_cx, crate));
|
||||
time(time_passes, "alias checking",
|
||||
bind middle::alias::check_crate(ty_cx, crate));
|
||||
let copy_map = time(time_passes, "alias checking",
|
||||
bind middle::alias::check_crate(ty_cx, crate));
|
||||
time(time_passes, "kind checking", bind kind::check_crate(ty_cx, crate));
|
||||
if sess.get_opts().no_trans { ret; }
|
||||
let llmod =
|
||||
time(time_passes, "translation",
|
||||
bind trans::trans_crate(sess, crate, ty_cx, output, ast_map,
|
||||
mut_map));
|
||||
mut_map, copy_map));
|
||||
time(time_passes, "LLVM passes",
|
||||
bind link::write::run_passes(sess, llmod, output));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue