Skip to content

Commit 50c6aa6

Browse files
committed
---
yaml --- r: 94739 b: refs/heads/try c: e84f79f h: refs/heads/master i: 94737: 4887102 94735: 88cd5d0 v: v3
1 parent fb5698c commit 50c6aa6

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 8c3a552ac54d96394c395d6edd2e9cded8e52b0c
5+
refs/heads/try: e84f79feb17d0b17f5898b5df934c3a5588eb4cf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3268,7 +3268,8 @@ pub fn trans_crate(sess: session::Session,
32683268
}
32693269
}
32703270
if ccx.sess.count_llvm_insns() {
3271-
for (k, v) in ccx.stats.llvm_insns.iter() {
3271+
let llvm_insns = ccx.stats.llvm_insns.borrow();
3272+
for (k, v) in llvm_insns.get().iter() {
32723273
println!("{:7u} {}", *v, *k);
32733274
}
32743275
}

branches/try/src/librustc/middle/trans/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Builder {
5454
}
5555
if self.ccx.sess.count_llvm_insns() {
5656
base::with_insn_ctxt(|v| {
57-
let h = &mut self.ccx.stats.llvm_insns;
57+
let mut h = self.ccx.stats.llvm_insns.borrow_mut();
5858

5959
// Build version of path with cycles removed.
6060

@@ -82,11 +82,11 @@ impl Builder {
8282
s.push_char('/');
8383
s.push_str(category);
8484

85-
let n = match h.find(&s) {
85+
let n = match h.get().find(&s) {
8686
Some(&n) => n,
8787
_ => 0u
8888
};
89-
h.insert(s, n+1u);
89+
h.get().insert(s, n+1u);
9090
})
9191
}
9292
}

branches/try/src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub struct Stats {
135135
n_inlines: Cell<uint>,
136136
n_closures: Cell<uint>,
137137
n_llvm_insns: Cell<uint>,
138-
llvm_insns: HashMap<~str, uint>,
138+
llvm_insns: RefCell<HashMap<~str, uint>>,
139139
fn_stats: ~[(~str, uint, uint)] // (ident, time-in-ms, llvm-instructions)
140140
}
141141

branches/try/src/librustc/middle/trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl CrateContext {
220220
n_inlines: Cell::new(0u),
221221
n_closures: Cell::new(0u),
222222
n_llvm_insns: Cell::new(0u),
223-
llvm_insns: HashMap::new(),
223+
llvm_insns: RefCell::new(HashMap::new()),
224224
fn_stats: ~[]
225225
},
226226
tydesc_type: tydesc_type,

0 commit comments

Comments
 (0)