Skip to content

Commit b09e38d

Browse files
committed
---
yaml --- r: 147615 b: refs/heads/try2 c: e5c399a h: refs/heads/master i: 147613: ef22087 147611: 1fb425c 147607: a22a1e5 147599: 80f7b4b 147583: a99a75c v: v3
1 parent 86a3425 commit b09e38d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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: 01ee2fb2246cf72f3dc748fa2aa143c8b70974cc
8+
refs/heads/try2: e5c399a83cc0b85b5d79bb6d5377f18d348cc597
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/liveness.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct IrMaps {
247247

248248
num_live_nodes: Cell<uint>,
249249
num_vars: Cell<uint>,
250-
live_node_map: HashMap<NodeId, LiveNode>,
250+
live_node_map: RefCell<HashMap<NodeId, LiveNode>>,
251251
variable_map: HashMap<NodeId, Variable>,
252252
capture_info_map: HashMap<NodeId, @~[CaptureInfo]>,
253253
var_kinds: ~[VarKind],
@@ -264,7 +264,7 @@ fn IrMaps(tcx: ty::ctxt,
264264
capture_map: capture_map,
265265
num_live_nodes: Cell::new(0),
266266
num_vars: Cell::new(0),
267-
live_node_map: HashMap::new(),
267+
live_node_map: RefCell::new(HashMap::new()),
268268
variable_map: HashMap::new(),
269269
capture_info_map: HashMap::new(),
270270
var_kinds: ~[],
@@ -289,7 +289,8 @@ impl IrMaps {
289289
node_id: NodeId,
290290
lnk: LiveNodeKind) {
291291
let ln = self.add_live_node(lnk);
292-
self.live_node_map.insert(node_id, ln);
292+
let mut live_node_map = self.live_node_map.borrow_mut();
293+
live_node_map.get().insert(node_id, ln);
293294

294295
debug!("{} is node {}", ln.to_str(), node_id);
295296
}
@@ -616,7 +617,8 @@ fn Liveness(ir: @mut IrMaps, specials: Specials) -> Liveness {
616617
impl Liveness {
617618
pub fn live_node(&self, node_id: NodeId, span: Span) -> LiveNode {
618619
let ir: &mut IrMaps = self.ir;
619-
match ir.live_node_map.find(&node_id) {
620+
let live_node_map = ir.live_node_map.borrow();
621+
match live_node_map.get().find(&node_id) {
620622
Some(&ln) => ln,
621623
None => {
622624
// This must be a mismatch between the ir_map construction

0 commit comments

Comments
 (0)