Move mutability checking into its own pass.
Having it in the alias pass was slightly more efficient (finding expression roots has to be done in both passes), but further muddled up the already complex alias checker. Also factors out some duplication in the mutability-checking code.
This commit is contained in:
parent
34ae491ca9
commit
2d1dec78e7
13 changed files with 292 additions and 290 deletions
|
|
@ -165,8 +165,10 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: &istr,
|
|||
time(time_passes, ~"typestate checking",
|
||||
bind middle::tstate::ck::check_crate(ty_cx, crate));
|
||||
}
|
||||
let mut_map = time(time_passes, ~"alias checking",
|
||||
bind middle::alias::check_crate(ty_cx, crate));
|
||||
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));
|
||||
time(time_passes, ~"kind checking",
|
||||
bind kind::check_crate(ty_cx, crate));
|
||||
if sess.get_opts().no_trans { ret; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue