Skip to content

Commit 80f7b4b

Browse files
committed
---
yaml --- r: 147599 b: refs/heads/try2 c: d7392bd h: refs/heads/master i: 147597: 77fde79 147595: 73a7e0b 147591: 8ec8032 147583: a99a75c v: v3
1 parent 2a0eb85 commit 80f7b4b

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
@@ -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: c909c34b5de27fbd0a90b04e9d9c03130c45452b
8+
refs/heads/try2: d7392bd3aec5ca3d017745f1a47b38df9ddaf968
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/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/try2/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/try2/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)