Skip to content

Commit 01c6103

Browse files
committed
---
yaml --- r: 89021 b: refs/heads/snap-stage3 c: 8728b09 h: refs/heads/master i: 89019: 43d38b2 v: v3
1 parent 133a5db commit 01c6103

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
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: 7acaa73377e9ed8b337a66c968286e6581dc7b24
4+
refs/heads/snap-stage3: 8728b09e78805672d0e948118b29064921da0278
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ pub fn need_invoke(bcx: @Block) -> bool {
997997
pub fn have_cached_lpad(bcx: @Block) -> bool {
998998
let mut res = false;
999999
in_lpad_scope_cx(bcx, |inf| {
1000-
match inf.landing_pad {
1000+
match inf.landing_pad.get() {
10011001
Some(_) => res = true,
10021002
None => res = false
10031003
}
@@ -1032,11 +1032,11 @@ pub fn get_landing_pad(bcx: @Block) -> BasicBlockRef {
10321032
let mut pad_bcx = bcx; // Guaranteed to be set below
10331033
in_lpad_scope_cx(bcx, |inf| {
10341034
// If there is a valid landing pad still around, use it
1035-
match inf.landing_pad {
1035+
match inf.landing_pad.get() {
10361036
Some(target) => cached = Some(target),
10371037
None => {
10381038
pad_bcx = lpad_block(bcx, "unwind");
1039-
inf.landing_pad = Some(pad_bcx.llbb);
1039+
inf.landing_pad.set(Some(pad_bcx.llbb));
10401040
}
10411041
}
10421042
});
@@ -1224,7 +1224,7 @@ pub fn simple_block_scope(parent: Option<@mut ScopeInfo>,
12241224
loop_label: None,
12251225
cleanups: RefCell::new(~[]),
12261226
cleanup_paths: RefCell::new(~[]),
1227-
landing_pad: None,
1227+
landing_pad: Cell::new(None),
12281228
node_info: node_info,
12291229
}
12301230
}
@@ -1254,7 +1254,7 @@ pub fn loop_scope_block(bcx: @Block,
12541254
loop_label: loop_label,
12551255
cleanups: RefCell::new(~[]),
12561256
cleanup_paths: RefCell::new(~[]),
1257-
landing_pad: None,
1257+
landing_pad: Cell::new(None),
12581258
node_info: opt_node_info,
12591259
}), bcx.is_lpad, n, opt_node_info);
12601260
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ pub struct cleanup_path {
431431
}
432432

433433
pub fn shrink_scope_clean(scope_info: &mut ScopeInfo, size: uint) {
434-
scope_info.landing_pad = None;
434+
scope_info.landing_pad.set(None);
435435
let new_cleanup_paths = {
436436
let cleanup_paths = scope_info.cleanup_paths.borrow();
437437
cleanup_paths.get()
@@ -444,7 +444,7 @@ pub fn shrink_scope_clean(scope_info: &mut ScopeInfo, size: uint) {
444444
}
445445

446446
pub fn grow_scope_clean(scope_info: &mut ScopeInfo) {
447-
scope_info.landing_pad = None;
447+
scope_info.landing_pad.set(None);
448448
}
449449

450450
pub fn cleanup_type(cx: ty::ctxt, ty: ty::t) -> cleantype {
@@ -634,7 +634,7 @@ pub struct ScopeInfo {
634634
// cleared when the set of cleanups changes.
635635
cleanup_paths: RefCell<~[cleanup_path]>,
636636
// Unwinding landing pad. Also cleared when cleanups change.
637-
landing_pad: Option<BasicBlockRef>,
637+
landing_pad: Cell<Option<BasicBlockRef>>,
638638
// info about the AST node this scope originated from, if any
639639
node_info: Option<NodeInfo>,
640640
}

0 commit comments

Comments
 (0)