@@ -1188,7 +1188,7 @@ pub fn trans_stmt(cx: @Block, s: &ast::Stmt) -> @Block {
1188
1188
1189
1189
// You probably don't want to use this one. See the
1190
1190
// next three functions instead.
1191
- pub fn new_block ( cx : @mut FunctionContext ,
1191
+ pub fn new_block ( cx : @FunctionContext ,
1192
1192
parent : Option < @Block > ,
1193
1193
scope : Option < @mut ScopeInfo > ,
1194
1194
is_lpad : bool ,
@@ -1229,7 +1229,7 @@ pub fn simple_block_scope(parent: Option<@mut ScopeInfo>,
1229
1229
}
1230
1230
1231
1231
// Use this when you're at the top block of a function or the like.
1232
- pub fn top_scope_block ( fcx : @mut FunctionContext , opt_node_info : Option < NodeInfo > )
1232
+ pub fn top_scope_block ( fcx : @FunctionContext , opt_node_info : Option < NodeInfo > )
1233
1233
-> @Block {
1234
1234
return new_block ( fcx, None , Some ( simple_block_scope ( None , opt_node_info) ) , false ,
1235
1235
"function top level" , opt_node_info) ;
@@ -1268,7 +1268,7 @@ pub fn sub_block(bcx: @Block, n: &str) -> @Block {
1268
1268
new_block ( bcx. fcx , Some ( bcx) , None , bcx. is_lpad , n, None )
1269
1269
}
1270
1270
1271
- pub fn raw_block ( fcx : @mut FunctionContext , is_lpad : bool , llbb : BasicBlockRef ) -> @Block {
1271
+ pub fn raw_block ( fcx : @FunctionContext , is_lpad : bool , llbb : BasicBlockRef ) -> @Block {
1272
1272
@Block :: new ( llbb, None , is_lpad, None , fcx)
1273
1273
}
1274
1274
@@ -1635,7 +1635,7 @@ pub fn mk_return_basic_block(llfn: ValueRef) -> BasicBlockRef {
1635
1635
1636
1636
// Creates and returns space for, or returns the argument representing, the
1637
1637
// slot where the return value of the function must go.
1638
- pub fn make_return_pointer ( fcx : @mut FunctionContext , output_type : ty:: t ) -> ValueRef {
1638
+ pub fn make_return_pointer ( fcx : @FunctionContext , output_type : ty:: t ) -> ValueRef {
1639
1639
unsafe {
1640
1640
if type_of:: return_uses_outptr ( fcx. ccx , output_type) {
1641
1641
llvm:: LLVMGetParam ( fcx. llfn , 0 )
@@ -1662,7 +1662,7 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
1662
1662
param_substs : Option < @param_substs > ,
1663
1663
opt_node_info : Option < NodeInfo > ,
1664
1664
sp : Option < Span > )
1665
- -> @mut FunctionContext {
1665
+ -> @FunctionContext {
1666
1666
for p in param_substs. iter ( ) { p. validate ( ) ; }
1667
1667
1668
1668
debug ! ( "new_fn_ctxt_w_id(path={}, id={:?}, \
@@ -1680,7 +1680,7 @@ pub fn new_fn_ctxt_w_id(ccx: @CrateContext,
1680
1680
let uses_outptr = type_of:: return_uses_outptr ( ccx, substd_output_type) ;
1681
1681
let debug_context = debuginfo:: create_function_debug_context ( ccx, id, param_substs, llfndecl) ;
1682
1682
1683
- let fcx = @mut FunctionContext {
1683
+ let fcx = @FunctionContext {
1684
1684
llfn : llfndecl,
1685
1685
llenv : unsafe {
1686
1686
Cell :: new ( llvm:: LLVMGetUndef ( Type :: i8p ( ) . to_ref ( ) ) )
@@ -1734,7 +1734,7 @@ pub fn new_fn_ctxt(ccx: @CrateContext,
1734
1734
llfndecl : ValueRef ,
1735
1735
output_type : ty:: t ,
1736
1736
sp : Option < Span > )
1737
- -> @mut FunctionContext {
1737
+ -> @FunctionContext {
1738
1738
new_fn_ctxt_w_id ( ccx, path, llfndecl, -1 , output_type, false , None , None , sp)
1739
1739
}
1740
1740
@@ -1752,7 +1752,7 @@ pub fn new_fn_ctxt(ccx: @CrateContext,
1752
1752
// spaces that have been created for them (by code in the llallocas field of
1753
1753
// the function's fn_ctxt). create_llargs_for_fn_args populates the llargs
1754
1754
// field of the fn_ctxt with
1755
- pub fn create_llargs_for_fn_args ( cx : @mut FunctionContext ,
1755
+ pub fn create_llargs_for_fn_args ( cx : @FunctionContext ,
1756
1756
self_arg : self_arg ,
1757
1757
args : & [ ast:: arg ] )
1758
1758
-> ~[ ValueRef ] {
@@ -1776,7 +1776,7 @@ pub fn create_llargs_for_fn_args(cx: @mut FunctionContext,
1776
1776
} )
1777
1777
}
1778
1778
1779
- pub fn copy_args_to_allocas ( fcx : @mut FunctionContext ,
1779
+ pub fn copy_args_to_allocas ( fcx : @FunctionContext ,
1780
1780
bcx : @Block ,
1781
1781
args : & [ ast:: arg ] ,
1782
1782
raw_llargs : & [ ValueRef ] ,
@@ -1840,7 +1840,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
1840
1840
1841
1841
// Ties up the llstaticallocas -> llloadenv -> lltop edges,
1842
1842
// and builds the return block.
1843
- pub fn finish_fn ( fcx : @mut FunctionContext , last_bcx : @Block ) {
1843
+ pub fn finish_fn ( fcx : @FunctionContext , last_bcx : @Block ) {
1844
1844
let _icx = push_ctxt ( "finish_fn" ) ;
1845
1845
1846
1846
let ret_cx = match fcx. llreturn . get ( ) {
@@ -1901,7 +1901,7 @@ pub fn trans_closure(ccx: @CrateContext,
1901
1901
id : ast:: NodeId ,
1902
1902
_attributes : & [ ast:: Attribute ] ,
1903
1903
output_type : ty:: t ,
1904
- maybe_load_env: |@mut FunctionContext |) {
1904
+ maybe_load_env : |@FunctionContext |) {
1905
1905
ccx. stats . n_closures += 1 ;
1906
1906
let _icx = push_ctxt ( "trans_closure" ) ;
1907
1907
set_uwtable ( llfndecl) ;
0 commit comments