提交 38572f49 编写于 作者: P Patrick Walton

librustc: De-`@mut` `n_fns` in the stats

上级 16828bb1
......@@ -166,7 +166,7 @@ fn drop(&mut self) {
self.ccx.stats.fn_stats.push((self.name.to_owned(),
elapsed,
iend - self.istart));
self.ccx.stats.n_fns += 1;
self.ccx.stats.n_fns.set(self.ccx.stats.n_fns.get() + 1);
// Reset LLVM insn count to avoid compound costs.
self.ccx.stats.n_llvm_insns = self.istart;
}
......@@ -3250,7 +3250,7 @@ pub fn trans_crate(sess: session::Session,
println!("n_null_glues: {}", ccx.stats.n_null_glues.get());
println!("n_real_glues: {}", ccx.stats.n_real_glues.get());
println!("n_fns: {}", ccx.stats.n_fns);
println!("n_fns: {}", ccx.stats.n_fns.get());
println!("n_monos: {}", ccx.stats.n_monos);
println!("n_inlines: {}", ccx.stats.n_inlines);
println!("n_closures: {}", ccx.stats.n_closures);
......
......@@ -130,7 +130,7 @@ pub struct Stats {
n_glues_created: Cell<uint>,
n_null_glues: Cell<uint>,
n_real_glues: Cell<uint>,
n_fns: uint,
n_fns: Cell<uint>,
n_monos: uint,
n_inlines: uint,
n_closures: uint,
......
......@@ -215,7 +215,7 @@ pub fn new(sess: session::Session,
n_glues_created: Cell::new(0u),
n_null_glues: Cell::new(0u),
n_real_glues: Cell::new(0u),
n_fns: 0u,
n_fns: Cell::new(0u),
n_monos: 0u,
n_inlines: 0u,
n_closures: 0u,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册