librustc: De-@mut n_fns in the stats

This commit is contained in:
Patrick Walton 2013-12-22 13:44:42 -08:00
parent 16828bb1dc
commit 38572f4981
3 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ impl<'a> Drop for StatRecorder<'a> {
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);

View File

@ -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,

View File

@ -215,7 +215,7 @@ impl CrateContext {
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,