Skip to content

Commit ffd2a9e

Browse files
committed
---
yaml --- r: 97023 b: refs/heads/dist-snap c: 727fa3a h: refs/heads/master i: 97021: 0a3c379 97019: 08380bb 97015: 7277c8a 97007: 8facb4f 96991: 25e787b 96959: 0d6ff60 96895: b1ab6ad 96767: 8d42785 v: v3
1 parent 00a34c9 commit ffd2a9e

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
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: ea5368ce6e5eb1c9b28e3e072dca4f0b063f15b2
9+
refs/heads/dist-snap: 727fa3aa01cc9cb5429e3782a45a8625ceeafd48
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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/dist-snap/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)