提交 21e4e410 编写于 作者: P Patrick Walton

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

上级 c010d08c
......@@ -1914,7 +1914,8 @@ pub fn trans_closure(ccx: @CrateContext,
_attributes: &[ast::Attribute],
output_type: ty::t,
maybe_load_env: |@FunctionContext|) {
ccx.stats.n_closures += 1;
ccx.stats.n_closures.set(ccx.stats.n_closures.get() + 1);
let _icx = push_ctxt("trans_closure");
set_uwtable(llfndecl);
......@@ -3253,7 +3254,7 @@ pub fn trans_crate(sess: session::Session,
println!("n_fns: {}", ccx.stats.n_fns.get());
println!("n_monos: {}", ccx.stats.n_monos.get());
println!("n_inlines: {}", ccx.stats.n_inlines.get());
println!("n_closures: {}", ccx.stats.n_closures);
println!("n_closures: {}", ccx.stats.n_closures.get());
println("fn stats:");
ccx.stats.fn_stats.sort_by(|&(_, _, insns_a), &(_, _, insns_b)| insns_b.cmp(&insns_a));
......
......@@ -133,7 +133,7 @@ pub struct Stats {
n_fns: Cell<uint>,
n_monos: Cell<uint>,
n_inlines: Cell<uint>,
n_closures: uint,
n_closures: Cell<uint>,
n_llvm_insns: uint,
llvm_insn_ctxt: ~[~str],
llvm_insns: HashMap<~str, uint>,
......
......@@ -218,7 +218,7 @@ pub fn new(sess: session::Session,
n_fns: Cell::new(0u),
n_monos: Cell::new(0u),
n_inlines: Cell::new(0u),
n_closures: 0u,
n_closures: Cell::new(0u),
n_llvm_insns: 0u,
llvm_insn_ctxt: ~[],
llvm_insns: HashMap::new(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册