Skip to content

Commit c010d08

Browse files
committed
librustc: De-@mut n_inlines in the stats
1 parent 8c7804f commit c010d08

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3252,7 +3252,7 @@ pub fn trans_crate(sess: session::Session,
32523252

32533253
println!("n_fns: {}", ccx.stats.n_fns.get());
32543254
println!("n_monos: {}", ccx.stats.n_monos.get());
3255-
println!("n_inlines: {}", ccx.stats.n_inlines);
3255+
println!("n_inlines: {}", ccx.stats.n_inlines.get());
32563256
println!("n_closures: {}", ccx.stats.n_closures);
32573257
println("fn stats:");
32583258

src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub struct Stats {
132132
n_real_glues: Cell<uint>,
133133
n_fns: Cell<uint>,
134134
n_monos: Cell<uint>,
135-
n_inlines: uint,
135+
n_inlines: Cell<uint>,
136136
n_closures: uint,
137137
n_llvm_insns: uint,
138138
llvm_insn_ctxt: ~[~str],

src/librustc/middle/trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl CrateContext {
217217
n_real_glues: Cell::new(0u),
218218
n_fns: Cell::new(0u),
219219
n_monos: Cell::new(0u),
220-
n_inlines: 0u,
220+
n_inlines: Cell::new(0u),
221221
n_closures: 0u,
222222
n_llvm_insns: 0u,
223223
llvm_insn_ctxt: ~[],

src/librustc/middle/trans/inline.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn maybe_instantiate_inline(ccx: @CrateContext, fn_id: ast::DefId)
6464
external_srcs.get().insert(item.id, fn_id);
6565
}
6666

67-
ccx.stats.n_inlines += 1;
67+
ccx.stats.n_inlines.set(ccx.stats.n_inlines.get() + 1);
6868
trans_item(ccx, item);
6969

7070
// We're bringing an external global into this crate, but we don't
@@ -146,7 +146,8 @@ pub fn maybe_instantiate_inline(ccx: @CrateContext, fn_id: ast::DefId)
146146
external_srcs.get().insert(mth.id, fn_id);
147147
}
148148

149-
ccx.stats.n_inlines += 1;
149+
ccx.stats.n_inlines.set(ccx.stats.n_inlines.get() + 1);
150+
150151
// If this is a default method, we can't look up the
151152
// impl type. But we aren't going to translate anyways, so don't.
152153
if is_provided { return local_def(mth.id); }

0 commit comments

Comments
 (0)