File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl<'a> Drop for StatRecorder<'a> {
166
166
self . ccx . stats . fn_stats . push ( ( self . name . to_owned ( ) ,
167
167
elapsed,
168
168
iend - self . istart ) ) ;
169
- self . ccx . stats . n_fns += 1 ;
169
+ self . ccx . stats . n_fns . set ( self . ccx . stats . n_fns . get ( ) + 1 ) ;
170
170
// Reset LLVM insn count to avoid compound costs.
171
171
self . ccx . stats . n_llvm_insns = self . istart ;
172
172
}
@@ -3250,7 +3250,7 @@ pub fn trans_crate(sess: session::Session,
3250
3250
println ! ( "n_null_glues: {}" , ccx. stats. n_null_glues. get( ) ) ;
3251
3251
println ! ( "n_real_glues: {}" , ccx. stats. n_real_glues. get( ) ) ;
3252
3252
3253
- println ! ( "n_fns: {}" , ccx. stats. n_fns) ;
3253
+ println ! ( "n_fns: {}" , ccx. stats. n_fns. get ( ) ) ;
3254
3254
println ! ( "n_monos: {}" , ccx. stats. n_monos) ;
3255
3255
println ! ( "n_inlines: {}" , ccx. stats. n_inlines) ;
3256
3256
println ! ( "n_closures: {}" , ccx. stats. n_closures) ;
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ pub struct Stats {
130
130
n_glues_created : Cell < uint > ,
131
131
n_null_glues : Cell < uint > ,
132
132
n_real_glues : Cell < uint > ,
133
- n_fns : uint ,
133
+ n_fns : Cell < uint > ,
134
134
n_monos : uint ,
135
135
n_inlines : uint ,
136
136
n_closures : uint ,
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ impl CrateContext {
215
215
n_glues_created : Cell :: new ( 0 u) ,
216
216
n_null_glues : Cell :: new ( 0 u) ,
217
217
n_real_glues : Cell :: new ( 0 u) ,
218
- n_fns : 0 u ,
218
+ n_fns : Cell :: new ( 0 u ) ,
219
219
n_monos : 0 u,
220
220
n_inlines : 0 u,
221
221
n_closures : 0 u,
You can’t perform that action at this time.
0 commit comments