Skip to content

Commit 223080f

Browse files
committed
---
yaml --- r: 88889 b: refs/heads/snap-stage3 c: 610096d h: refs/heads/master i: 88887: 775fb86 v: v3
1 parent 031c58b commit 223080f

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d3f58c59e48552612b8a177b527a5dcd0d6a1149
4+
refs/heads/snap-stage3: 610096d8c80275726183919a96a1f0c886acdb0e
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,11 @@ fn exported_name(ccx: &mut CrateContext, path: path, ty: ty::t, attrs: &[ast::At
24502450
pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
24512451
debug!("get_item_val(id=`{:?}`)", id);
24522452

2453-
let val = ccx.item_vals.find_copy(&id);
2453+
let val = {
2454+
let item_vals = ccx.item_vals.borrow();
2455+
item_vals.get().find_copy(&id)
2456+
};
2457+
24542458
match val {
24552459
Some(v) => v,
24562460
None => {
@@ -2689,7 +2693,8 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26892693
lib::llvm::SetLinkage(val, lib::llvm::InternalLinkage);
26902694
}
26912695

2692-
ccx.item_vals.insert(id, val);
2696+
let mut item_vals = ccx.item_vals.borrow_mut();
2697+
item_vals.get().insert(id, val);
26932698
val
26942699
}
26952700
}

branches/snap-stage3/src/librustc/middle/trans/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub struct CrateContext {
4747
tn: TypeNames,
4848
externs: ExternMap,
4949
intrinsics: HashMap<&'static str, ValueRef>,
50-
item_vals: HashMap<ast::NodeId, ValueRef>,
50+
item_vals: RefCell<HashMap<ast::NodeId, ValueRef>>,
5151
exp_map2: resolve::ExportMap2,
5252
reachable: @mut HashSet<ast::NodeId>,
5353
item_symbols: HashMap<ast::NodeId, ~str>,
@@ -187,7 +187,7 @@ impl CrateContext {
187187
tn: tn,
188188
externs: HashMap::new(),
189189
intrinsics: intrinsics,
190-
item_vals: HashMap::new(),
190+
item_vals: RefCell::new(HashMap::new()),
191191
exp_map2: emap2,
192192
reachable: reachable,
193193
item_symbols: HashMap::new(),

0 commit comments

Comments
 (0)