Skip to content

Commit 3c5d8b9

Browse files
committed
---
yaml --- r: 92669 b: refs/heads/auto c: d7392bd h: refs/heads/master i: 92667: efa6bc1 v: v3
1 parent 17c8f38 commit 3c5d8b9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: c909c34b5de27fbd0a90b04e9d9c03130c45452b
16+
refs/heads/auto: d7392bd3aec5ca3d017745f1a47b38df9ddaf968
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use util::sha2::Sha256;
6969
use middle::trans::type_::Type;
7070

7171
use std::c_str::ToCStr;
72-
use std::cell::RefCell;
72+
use std::cell::{Cell, RefCell};
7373
use std::hashmap::HashMap;
7474
use std::libc::c_uint;
7575
use std::vec;
@@ -1683,7 +1683,7 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
16831683
let fcx = @mut FunctionContext {
16841684
llfn: llfndecl,
16851685
llenv: unsafe {
1686-
llvm::LLVMGetUndef(Type::i8p().to_ref())
1686+
Cell::new(llvm::LLVMGetUndef(Type::i8p().to_ref()))
16871687
},
16881688
llretptr: None,
16891689
entry_bcx: None,
@@ -1702,9 +1702,9 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
17021702
ccx: ccx,
17031703
debug_context: debug_context,
17041704
};
1705-
fcx.llenv = unsafe {
1705+
fcx.llenv.set(unsafe {
17061706
llvm::LLVMGetParam(llfndecl, fcx.env_arg_pos() as c_uint)
1707-
};
1707+
});
17081708

17091709
unsafe {
17101710
let entry_bcx = top_scope_block(fcx, opt_node_info);
@@ -1759,7 +1759,7 @@ pub fn create_llargs_for_fn_args(cx: @mut FunctionContext,
17591759
match self_arg {
17601760
impl_self(tt, self_mode) => {
17611761
cx.llself = Some(ValSelfData {
1762-
v: cx.llenv,
1762+
v: cx.llenv.get(),
17631763
t: tt,
17641764
is_copy: self_mode == ty::ByCopy
17651765
});

branches/auto/src/librustc/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ pub fn load_environment(fcx: @mut FunctionContext,
307307
let bcx = fcx.entry_bcx.unwrap();
308308

309309
// Load a pointer to the closure data, skipping over the box header:
310-
let llcdata = opaque_box_body(bcx, cdata_ty, fcx.llenv);
310+
let llcdata = opaque_box_body(bcx, cdata_ty, fcx.llenv.get());
311311

312312
// Store the pointer to closure data in an alloca for debug info because that's what the
313313
// llvm.dbg.declare intrinsic expects

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub struct FunctionContext {
206206

207207
// The implicit environment argument that arrives in the function we're
208208
// creating.
209-
llenv: ValueRef,
209+
llenv: Cell<ValueRef>,
210210

211211
// The place to store the return value. If the return type is immediate,
212212
// this is an alloca in the function. Otherwise, it's the hidden first

0 commit comments

Comments
 (0)