Skip to content

Commit dc48d60

Browse files
committed
---
yaml --- r: 94663 b: refs/heads/try c: e5c399a h: refs/heads/master i: 94661: 72117da 94659: 868710b 94655: 72a5da8 v: v3
1 parent c29431f commit dc48d60

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 01ee2fb2246cf72f3dc748fa2aa143c8b70974cc
5+
refs/heads/try: e5c399a83cc0b85b5d79bb6d5377f18d348cc597
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

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