Skip to content

Commit 658ce3f

Browse files
committed
---
yaml --- r: 88947 b: refs/heads/snap-stage3 c: 727fa3a h: refs/heads/master i: 88945: 8aafe2a 88943: ca3d1fb v: v3
1 parent 55ca388 commit 658ce3f

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-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: ea5368ce6e5eb1c9b28e3e072dca4f0b063f15b2
4+
refs/heads/snap-stage3: 727fa3aa01cc9cb5429e3782a45a8625ceeafd48
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/ty.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ pub fn mk_ctxt(s: session::Session,
10061006
impls: RefCell::new(HashMap::new()),
10071007
used_unsafe: @mut HashSet::new(),
10081008
used_mut_nodes: @mut HashSet::new(),
1009-
impl_vtables: @mut HashMap::new(),
1009+
impl_vtables: RefCell::new(HashMap::new()),
10101010
populated_external_types: @mut HashSet::new(),
10111011
populated_external_traits: @mut HashSet::new(),
10121012

@@ -3980,8 +3980,9 @@ pub fn lookup_item_type(cx: ctxt,
39803980
pub fn lookup_impl_vtables(cx: ctxt,
39813981
did: ast::DefId)
39823982
-> typeck::impl_res {
3983+
let mut impl_vtables = cx.impl_vtables.borrow_mut();
39833984
lookup_locally_or_in_crate_store(
3984-
"impl_vtables", did, cx.impl_vtables,
3985+
"impl_vtables", did, impl_vtables.get(),
39853986
|| csearch::get_impl_vtables(cx, did) )
39863987
}
39873988

branches/snap-stage3/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,9 @@ pub fn resolve_impl(ccx: @mut CrateCtxt,
778778
self_vtables: self_vtable_res
779779
};
780780
let impl_def_id = ast_util::local_def(impl_item.id);
781-
ccx.tcx.impl_vtables.insert(impl_def_id, res);
781+
782+
let mut impl_vtables = ccx.tcx.impl_vtables.borrow_mut();
783+
impl_vtables.get().insert(impl_def_id, res);
782784
}
783785

784786
impl visit::Visitor<()> for @FnCtxt {

branches/snap-stage3/src/librustc/middle/typeck/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ use util::common::time;
6868
use util::ppaux::Repr;
6969
use util::ppaux;
7070

71+
use std::cell::RefCell;
7172
use std::hashmap::HashMap;
7273
use std::result;
7374
use extra::list::List;
@@ -225,7 +226,7 @@ impl Repr for impl_res {
225226
}
226227
}
227228

228-
pub type impl_vtable_map = @mut HashMap<ast::DefId, impl_res>;
229+
pub type impl_vtable_map = RefCell<HashMap<ast::DefId, impl_res>>;
229230

230231
pub struct CrateCtxt {
231232
// A mapping from method call sites to traits that have that method.

0 commit comments

Comments
 (0)