librustc: De-@mut n_real_glues

This commit is contained in:
Patrick Walton 2013-12-22 13:41:16 -08:00
parent 75efa0725d
commit 16828bb1dc
4 changed files with 11 additions and 7 deletions

View File

@ -3248,7 +3248,7 @@ pub fn trans_crate(sess: session::Session,
println!("n_static_tydescs: {}", ccx.stats.n_static_tydescs.get());
println!("n_glues_created: {}", ccx.stats.n_glues_created.get());
println!("n_null_glues: {}", ccx.stats.n_null_glues.get());
println!("n_real_glues: {}", ccx.stats.n_real_glues);
println!("n_real_glues: {}", ccx.stats.n_real_glues.get());
println!("n_fns: {}", ccx.stats.n_fns);
println!("n_monos: {}", ccx.stats.n_monos);

View File

@ -129,7 +129,7 @@ pub struct Stats {
n_static_tydescs: Cell<uint>,
n_glues_created: Cell<uint>,
n_null_glues: Cell<uint>,
n_real_glues: uint,
n_real_glues: Cell<uint>,
n_fns: uint,
n_monos: uint,
n_inlines: uint,

View File

@ -214,7 +214,7 @@ impl CrateContext {
n_static_tydescs: Cell::new(0u),
n_glues_created: Cell::new(0u),
n_null_glues: Cell::new(0u),
n_real_glues: 0u,
n_real_glues: Cell::new(0u),
n_fns: 0u,
n_monos: 0u,
n_inlines: 0u,

View File

@ -715,7 +715,8 @@ pub fn emit_tydescs(ccx: &CrateContext) {
}
Some(v) => {
unsafe {
ccx.stats.n_real_glues += 1u;
ccx.stats.n_real_glues.set(ccx.stats.n_real_glues.get() +
1);
llvm::LLVMConstPointerCast(v, glue_fn_ty.to_ref())
}
}
@ -729,7 +730,8 @@ pub fn emit_tydescs(ccx: &CrateContext) {
}
Some(v) => {
unsafe {
ccx.stats.n_real_glues += 1u;
ccx.stats.n_real_glues.set(ccx.stats.n_real_glues.get() +
1);
llvm::LLVMConstPointerCast(v, glue_fn_ty.to_ref())
}
}
@ -743,7 +745,8 @@ pub fn emit_tydescs(ccx: &CrateContext) {
}
Some(v) => {
unsafe {
ccx.stats.n_real_glues += 1u;
ccx.stats.n_real_glues.set(ccx.stats.n_real_glues.get() +
1);
llvm::LLVMConstPointerCast(v, glue_fn_ty.to_ref())
}
}
@ -757,7 +760,8 @@ pub fn emit_tydescs(ccx: &CrateContext) {
}
Some(v) => {
unsafe {
ccx.stats.n_real_glues += 1u;
ccx.stats.n_real_glues.set(ccx.stats.n_real_glues.get() +
1);
llvm::LLVMConstPointerCast(v, glue_fn_ty.to_ref())
}
}