fn find_cal_len_arg(ctx: &mut LenContext, args: &mut [Value], fields: &[Field]) {
    let args_raw_slice = RawSlice::new(args);
    for val in args.iter_mut().filter_map(inner_val_mut) {
        let current_node = val as *const _;
        let ty = val.ty(ctx.target);
        if ty.as_len().is_none() {
            continue;
        }
        let path = ty.checked_as_len().path().to_vec();
        let dst = val.checked_as_int_mut();

        if &path[0][..] == SYSCALL_REF {
            do_calculation(
                ctx,
                dst,
                &path[1..],
                ctx.syscall_args.clone(),
                ctx.syscall_fields.clone(),
            );
        } else {
            ctx.current_node = current_node;
            do_calculation(
                ctx,
                dst,
                &path,
                args_raw_slice.clone(),
                RawSlice::new(fields),
            );
        }
    }
}
/// Find and calculate all length args.
Find and calculate all length args.
Find and calculate all length args .
fn find_cal_len_arg(ctx: &mut LenContext, args: &mut [Value], fields: &[Field]) {
    let args_raw_slice = RawSlice::new(args);
    for val in args.iter_mut().filter_map(inner_val_mut) {
        let current_node = val as *const _;
        let ty = val.ty(ctx.target);
        if ty.as_len().is_none() {
            continue;
        }
        let path = ty.checked_as_len().path().to_vec();
        let dst = val.checked_as_int_mut();
        if &path[0][..] == SYSCALL_REF {
            do_calculation(
                ctx,
                dst,
                &path[1..],
                ctx.syscall_args.clone(),
                ctx.syscall_fields.clone(),
            );
        } else {
            ctx.current_node = current_node;
            do_calculation(
                ctx,
                dst,
                &path,
                args_raw_slice.clone(),
                RawSlice::new(fields),
            );
        }
    }
}
fn find_cal_len_arg ( ctx : & mut LenContext , args : & mut [ Value ] , fields : & [ Field ] ) { let args_raw_slice = RawSlice :: new ( args ) ; for val in args . iter_mut ( ) . filter_map ( inner_val_mut ) { let current_node = val as * const _ ; let ty = val . ty ( ctx . target ) ; if ty . as_len ( ) . is_none ( ) { continue ; } let path = ty . checked_as_len ( ) . path ( ) . to_vec ( ) ; let dst = val . checked_as_int_mut ( ) ; if & path [ 0 ] [ .. ] == SYSCALL_REF { do_calculation ( ctx , dst , & path [ 1 .. ] , ctx . syscall_args . clone ( ) , ctx . syscall_fields . clone ( ) , ) ; } else { ctx . current_node = current_node ; do_calculation ( ctx , dst , & path , args_raw_slice . clone ( ) , RawSlice :: new ( fields ) , ) ; } } }
Find and calculate all length args.
Find and calculate all length args .
ctx
&mut LenContext
args
&mut [Value]
fields
&[Field]
ctx
&mut LenContext
args
&mut [Value]
fields
&[Field]