@@ -6160,28 +6160,24 @@ fn copy_any_self_to_alloca(@fn_ctxt fcx,
6160
6160
}
6161
6161
6162
6162
6163
- fn copy_args_to_allocas( @fn_ctxt fcx ,
6163
+ fn copy_args_to_allocas( @block_ctxt bcx ,
6164
6164
vec[ ast. arg] args,
6165
6165
vec[ ty. arg] arg_tys) {
6166
6166
6167
- auto bcx = llallocas_block_ctxt( fcx) ;
6168
-
6169
6167
let uint arg_n = 0 u;
6170
6168
6171
6169
for ( ast. arg aarg in args) {
6172
6170
if ( aarg. mode != ast. alias) {
6173
- auto arg_t = type_of_arg( fcx. lcx, arg_tys. ( arg_n) ) ;
6171
+ auto arg_t = type_of_arg( bcx . fcx. lcx, arg_tys. ( arg_n) ) ;
6174
6172
auto a = alloca( bcx, arg_t) ;
6175
- auto argval = fcx. llargs. get( aarg. id) ;
6173
+ auto argval = bcx . fcx. llargs. get( aarg. id) ;
6176
6174
bcx. build. Store ( argval, a) ;
6177
6175
// Overwrite the llargs entry for this arg with its alloca.
6178
- fcx. llargs. insert( aarg. id, a) ;
6176
+ bcx . fcx. llargs. insert( aarg. id, a) ;
6179
6177
}
6180
6178
6181
6179
arg_n += 1 u;
6182
6180
}
6183
-
6184
- fcx. llallocas = bcx. llbb;
6185
6181
}
6186
6182
6187
6183
fn add_cleanups_for_args( & @block_ctxt bcx,
@@ -6317,9 +6313,9 @@ fn trans_fn(@local_ctxt cx, &ast._fn f, ast.def_id fid,
6317
6313
}
6318
6314
6319
6315
auto arg_tys = arg_tys_of_fn( fcx. lcx. ccx, ann) ;
6320
- copy_args_to_allocas( fcx, f. decl. inputs, arg_tys) ;
6321
6316
6322
6317
auto bcx = new_top_block_ctxt( fcx) ;
6318
+ copy_args_to_allocas( bcx, f. decl. inputs, arg_tys) ;
6323
6319
6324
6320
add_cleanups_for_args( bcx, f. decl. inputs, arg_tys) ;
6325
6321
@@ -6431,9 +6427,9 @@ fn trans_obj(@local_ctxt cx, &ast._obj ob, ast.def_id oid,
6431
6427
fn_args, ty_params) ;
6432
6428
6433
6429
let vec[ ty. arg] arg_tys = arg_tys_of_fn( ccx, ann) ;
6434
- copy_args_to_allocas( fcx, fn_args, arg_tys) ;
6435
6430
6436
6431
auto bcx = new_top_block_ctxt( fcx) ;
6432
+ copy_args_to_allocas( bcx, fn_args, arg_tys) ;
6437
6433
auto lltop = bcx. llbb;
6438
6434
6439
6435
auto self_ty = ret_ty_of_fn( ccx, ann) ;
@@ -6584,9 +6580,9 @@ fn trans_tag_variant(@local_ctxt cx, ast.def_id tag_id,
6584
6580
}
6585
6581
6586
6582
auto arg_tys = arg_tys_of_fn( cx. ccx, variant. node. ann) ;
6587
- copy_args_to_allocas( fcx, fn_args, arg_tys) ;
6588
6583
6589
6584
auto bcx = new_top_block_ctxt( fcx) ;
6585
+ copy_args_to_allocas( bcx, fn_args, arg_tys) ;
6590
6586
auto lltop = bcx. llbb;
6591
6587
6592
6588
// Cast the tag to a type we can GEP into.
0 commit comments