Skip to content

Commit 14f7473

Browse files
committed
---
yaml --- r: 94651 b: refs/heads/try c: cd5168b h: refs/heads/master i: 94649: 0da5e73 94647: e16f2bf v: v3
1 parent 3a323a4 commit 14f7473

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
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: bd6a2236e1b57050729071c6178d5c3937a38141
5+
refs/heads/try: cd5168b7cd9ae02029226f9384e78b2151a883ed
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
16891689
entry_bcx: None,
16901690
alloca_insert_pt: Cell::new(None),
16911691
llreturn: Cell::new(None),
1692-
llself: None,
1692+
llself: Cell::new(None),
16931693
personality: None,
16941694
caller_expects_out_pointer: uses_outptr,
16951695
llargs: RefCell::new(HashMap::new()),
@@ -1760,11 +1760,11 @@ pub fn create_llargs_for_fn_args(cx: @mut FunctionContext,
17601760

17611761
match self_arg {
17621762
impl_self(tt, self_mode) => {
1763-
cx.llself = Some(ValSelfData {
1763+
cx.llself.set(Some(ValSelfData {
17641764
v: cx.llenv.get(),
17651765
t: tt,
17661766
is_copy: self_mode == ty::ByCopy
1767-
});
1767+
}));
17681768
}
17691769
no_self => ()
17701770
}
@@ -1788,7 +1788,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
17881788
let _icx = push_ctxt("copy_args_to_allocas");
17891789
let mut bcx = bcx;
17901790

1791-
match fcx.llself {
1791+
match fcx.llself.get() {
17921792
Some(slf) => {
17931793
let self_val = if slf.is_copy
17941794
&& datum::appropriate_mode(bcx.ccx(), slf.t).is_by_value() {
@@ -1800,7 +1800,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
18001800
PointerCast(bcx, slf.v, type_of(bcx.ccx(), slf.t).ptr_to())
18011801
};
18021802

1803-
fcx.llself = Some(ValSelfData {v: self_val, ..slf});
1803+
fcx.llself.set(Some(ValSelfData {v: self_val, ..slf}));
18041804
add_clean(bcx, self_val, slf.t);
18051805

18061806
if fcx.ccx.sess.opts.extra_debuginfo {

branches/try/src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub struct FunctionContext {
229229
// NB: This is the type of the self *variable*, not the self *type*. The
230230
// self type is set only for default methods, while the self variable is
231231
// set for all methods.
232-
llself: Option<ValSelfData>,
232+
llself: Cell<Option<ValSelfData>>,
233233
// The a value alloca'd for calls to upcalls.rust_personality. Used when
234234
// outputting the resume instruction.
235235
personality: Option<ValueRef>,

branches/try/src/librustc/middle/trans/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,8 @@ pub fn trans_local_var(bcx: @Block, def: ast::Def) -> Datum {
11081108
take_local(bcx, lllocals.get(), nid)
11091109
}
11101110
ast::DefSelf(nid, _) => {
1111-
let self_info: ValSelfData = match bcx.fcx.llself {
1112-
Some(ref self_info) => *self_info,
1111+
let self_info: ValSelfData = match bcx.fcx.llself.get() {
1112+
Some(self_info) => self_info,
11131113
None => {
11141114
bcx.sess().bug(format!(
11151115
"trans_local_var: reference to self \

0 commit comments

Comments
 (0)