File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
branches/try2/src/librustc/middle/trans Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: c909c34b5de27fbd0a90b04e9d9c03130c45452b
8
+ refs/heads/try2: d7392bd3aec5ca3d017745f1a47b38df9ddaf968
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ use util::sha2::Sha256;
69
69
use middle:: trans:: type_:: Type ;
70
70
71
71
use std:: c_str:: ToCStr ;
72
- use std:: cell:: RefCell ;
72
+ use std:: cell:: { Cell , RefCell } ;
73
73
use std:: hashmap:: HashMap ;
74
74
use std:: libc:: c_uint;
75
75
use std:: vec;
@@ -1683,7 +1683,7 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
1683
1683
let fcx = @mut FunctionContext {
1684
1684
llfn : llfndecl,
1685
1685
llenv : unsafe {
1686
- llvm:: LLVMGetUndef ( Type :: i8p ( ) . to_ref ( ) )
1686
+ Cell :: new ( llvm:: LLVMGetUndef ( Type :: i8p ( ) . to_ref ( ) ) )
1687
1687
} ,
1688
1688
llretptr : None ,
1689
1689
entry_bcx : None ,
@@ -1702,9 +1702,9 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
1702
1702
ccx : ccx,
1703
1703
debug_context : debug_context,
1704
1704
} ;
1705
- fcx. llenv = unsafe {
1705
+ fcx. llenv . set ( unsafe {
1706
1706
llvm:: LLVMGetParam ( llfndecl, fcx. env_arg_pos ( ) as c_uint )
1707
- } ;
1707
+ } ) ;
1708
1708
1709
1709
unsafe {
1710
1710
let entry_bcx = top_scope_block ( fcx, opt_node_info) ;
@@ -1759,7 +1759,7 @@ pub fn create_llargs_for_fn_args(cx: @mut FunctionContext,
1759
1759
match self_arg {
1760
1760
impl_self( tt, self_mode) => {
1761
1761
cx. llself = Some ( ValSelfData {
1762
- v : cx. llenv ,
1762
+ v : cx. llenv . get ( ) ,
1763
1763
t : tt,
1764
1764
is_copy : self_mode == ty:: ByCopy
1765
1765
} ) ;
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ pub fn load_environment(fcx: @mut FunctionContext,
307
307
let bcx = fcx. entry_bcx . unwrap ( ) ;
308
308
309
309
// 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 ( ) ) ;
311
311
312
312
// Store the pointer to closure data in an alloca for debug info because that's what the
313
313
// llvm.dbg.declare intrinsic expects
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ pub struct FunctionContext {
206
206
207
207
// The implicit environment argument that arrives in the function we're
208
208
// creating.
209
- llenv : ValueRef ,
209
+ llenv : Cell < ValueRef > ,
210
210
211
211
// The place to store the return value. If the return type is immediate,
212
212
// this is an alloca in the function. Otherwise, it's the hidden first
You can’t perform that action at this time.
0 commit comments