Skip to content

Commit 6a43afb

Browse files
committed
---
yaml --- r: 147691 b: refs/heads/try2 c: e84f79f h: refs/heads/master i: 147689: 7cee5cf 147687: fdcf2e9 v: v3
1 parent 261dcaf commit 6a43afb

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8c3a552ac54d96394c395d6edd2e9cded8e52b0c
8+
refs/heads/try2: e84f79feb17d0b17f5898b5df934c3a5588eb4cf
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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/try2/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/try2/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)