fn create_datums_for_fn_args_under_call_abi<'blk, 'tcx>(
        mut bcx: Block<'blk, 'tcx>,
        arg_scope: cleanup::CustomScopeIndex,
        arg_tys: &[Ty<'tcx>])
        -> Vec<RvalueDatum<'tcx>> {
    let mut result = Vec::new();
    for (i, &arg_ty) in arg_tys.iter().enumerate() {
        if i < arg_tys.len() - 1 {
            // Regular argument.
            let llarg = get_param(bcx.fcx.llfn, bcx.fcx.arg_pos(i) as c_uint);
            result.push(datum::Datum::new(llarg, arg_ty, arg_kind(bcx.fcx,
                                                                  arg_ty)));
            continue
        }

        // This is the last argument. Tuple it.
        match arg_ty.sty {
            ty::ty_tup(ref tupled_arg_tys) => {
                let tuple_args_scope_id = cleanup::CustomScope(arg_scope);
                let tuple =
                    unpack_datum!(bcx,
                                  datum::lvalue_scratch_datum(bcx,
                                                              arg_ty,
                                                              "tupled_args",
                                                              tuple_args_scope_id,
                                                              (),
                                                              |(),
                                                               mut bcx,
                                                               llval| {
                        for (j, &tupled_arg_ty) in
                                    tupled_arg_tys.iter().enumerate() {
                            let llarg =
                                get_param(bcx.fcx.llfn,
                                          bcx.fcx.arg_pos(i + j) as c_uint);
                            let lldest = GEPi(bcx, llval, &[0, j]);
                            let datum = datum::Datum::new(
                                llarg,
                                tupled_arg_ty,
                                arg_kind(bcx.fcx, tupled_arg_ty));
                            bcx = datum.store_to(bcx, lldest);
                        }
                        bcx
                    }));
                let tuple = unpack_datum!(bcx,
                                          tuple.to_expr_datum()
                                               .to_rvalue_datum(bcx,
                                                                "argtuple"));
                result.push(tuple);
            }
            _ => {
                bcx.tcx().sess.bug("last argument of a function with \
                                    `rust-call` ABI isn't a tuple?!")
            }
        };

    }

    result
}
/// Creates rvalue datums for each of the incoming function arguments and
/// tuples the arguments. These will later be stored into appropriate lvalue
/// datums.
///
/// FIXME(pcwalton): Reduce the amount of code bloat this is responsible for.
Creates rvalue datums for each of the incoming function arguments and
tuples the arguments. These will later be stored into appropriate lvalue
datums.

Reduce the amount of code bloat this is responsible for.
Creates rvalue datums for each of the incoming function arguments and tuples the arguments . These will later be stored into appropriate lvalue datums . Reduce the amount of code bloat this is responsible for .
fn create_datums_for_fn_args_under_call_abi<'blk, 'tcx>(
        mut bcx: Block<'blk, 'tcx>,
        arg_scope: cleanup::CustomScopeIndex,
        arg_tys: &[Ty<'tcx>])
        -> Vec<RvalueDatum<'tcx>> {
    let mut result = Vec::new();
    for (i, &arg_ty) in arg_tys.iter().enumerate() {
        if i < arg_tys.len() - 1 {
            // Regular argument.
            let llarg = get_param(bcx.fcx.llfn, bcx.fcx.arg_pos(i) as c_uint);
            result.push(datum::Datum::new(llarg, arg_ty, arg_kind(bcx.fcx,
                                                                  arg_ty)));
            continue
        }
        // This is the last argument. Tuple it.
        match arg_ty.sty {
            ty::ty_tup(ref tupled_arg_tys) => {
                let tuple_args_scope_id = cleanup::CustomScope(arg_scope);
                let tuple =
                    unpack_datum!(bcx,
                                  datum::lvalue_scratch_datum(bcx,
                                                              arg_ty,
                                                              "tupled_args",
                                                              tuple_args_scope_id,
                                                              (),
                                                              |(),
                                                               mut bcx,
                                                               llval| {
                        for (j, &tupled_arg_ty) in
                                    tupled_arg_tys.iter().enumerate() {
                            let llarg =
                                get_param(bcx.fcx.llfn,
                                          bcx.fcx.arg_pos(i + j) as c_uint);
                            let lldest = GEPi(bcx, llval, &[0, j]);
                            let datum = datum::Datum::new(
                                llarg,
                                tupled_arg_ty,
                                arg_kind(bcx.fcx, tupled_arg_ty));
                            bcx = datum.store_to(bcx, lldest);
                        }
                        bcx
                    }));
                let tuple = unpack_datum!(bcx,
                                          tuple.to_expr_datum()
                                               .to_rvalue_datum(bcx,
                                                                "argtuple"));
                result.push(tuple);
            }
            _ => {
                bcx.tcx().sess.bug("last argument of a function with \
                                    `rust-call` ABI isn't a tuple?!")
            }
        };
    }
    result
}
fn create_datums_for_fn_args_under_call_abi < ' blk , ' tcx > ( mut bcx : Block < ' blk , ' tcx > , arg_scope : cleanup :: CustomScopeIndex , arg_tys : & [ Ty < ' tcx > ] ) -> Vec < RvalueDatum < ' tcx > > { let mut result = Vec :: new ( ) ; for ( i , & arg_ty ) in arg_tys . iter ( ) . enumerate ( ) { if i < arg_tys . len ( ) - 1 { // Regular argument. let llarg = get_param ( bcx . fcx . llfn , bcx . fcx . arg_pos ( i ) as c_uint ) ; result . push ( datum :: Datum :: new ( llarg , arg_ty , arg_kind ( bcx . fcx , arg_ty ) ) ) ; continue } // This is the last argument. Tuple it. match arg_ty . sty { ty :: ty_tup ( ref tupled_arg_tys ) => { let tuple_args_scope_id = cleanup :: CustomScope ( arg_scope ) ; let tuple = unpack_datum ! ( bcx datum lvalue_scratch_datum ( bcx arg_ty " " tuple_args_scope_id ( ) ( ) mut bcx llval { for ( j tupled_arg_ty ) in tupled_arg_tys iter ( ) enumerate ( ) { let llarg get_param ( bcx fcx llfn bcx fcx arg_pos ( i j ) as c_uint ) let lldest GEPi ( bcx llval [ 0 j ] ) let datum datum Datum new ( llarg tupled_arg_ty arg_kind ( bcx fcx tupled_arg_ty ) ) bcx datum store_to ( bcx lldest ) } bcx } ) ) ; let tuple = unpack_datum ! ( bcx tuple to_expr_datum ( ) to_rvalue_datum ( bcx " " ) ) ; result . push ( tuple ) ; } _ => { bcx . tcx ( ) . sess . bug ( " \
 " ) } } ; } result }
Creates rvalue datums for each of the incoming function arguments and
tuples the arguments.
Creates rvalue datums for each of the incoming function arguments and tuples the arguments .
bcx
Block<'blk, 'tcx>
arg_scope
cleanup::CustomScopeIndex
arg_tys
&[Ty<'tcx>]