pub fn stack_function_call(
    state: &AbstractState,
    function_index: FunctionHandleIndex,
) -> Result<AbstractState, VMError> {
    let state_copy = state.clone();
    let mut state = state.clone();
    let function_handle = state_copy.module.function_handle_at(function_index);
    let function_signature = state_copy
        .module
        .function_signature_at(function_handle.signature);
    for return_type in function_signature.return_types.iter() {
        let abstract_value = AbstractValue {
            token: return_type.clone(),
            kind: SignatureTokenView::new(&state.module, return_type).kind(&[]),
        };
        state = stack_push(&state, abstract_value)?;
    }
    Ok(state)
}
/// Simulate calling the function at `function_index`
Simulate calling the function at `function_index`
Simulate calling the function at ` function_index `
pub fn stack_function_call(
    state: &AbstractState,
    function_index: FunctionHandleIndex,
) -> Result<AbstractState, VMError> {
    let state_copy = state.clone();
    let mut state = state.clone();
    let function_handle = state_copy.module.function_handle_at(function_index);
    let function_signature = state_copy
        .module
        .function_signature_at(function_handle.signature);
    for return_type in function_signature.return_types.iter() {
        let abstract_value = AbstractValue {
            token: return_type.clone(),
            kind: SignatureTokenView::new(&state.module, return_type).kind(&[]),
        };
        state = stack_push(&state, abstract_value)?;
    }
    Ok(state)
}
pub fn stack_function_call ( state : & AbstractState , function_index : FunctionHandleIndex , ) -> Result < AbstractState , VMError > { let state_copy = state . clone ( ) ; let mut state = state . clone ( ) ; let function_handle = state_copy . module . function_handle_at ( function_index ) ; let function_signature = state_copy . module . function_signature_at ( function_handle . signature ) ; for return_type in function_signature . return_types . iter ( ) { let abstract_value = AbstractValue { token : return_type . clone ( ) , kind : SignatureTokenView :: new ( & state . module , return_type ) . kind ( & [ ] ) , } ; state = stack_push ( & state , abstract_value ) ? ; } Ok ( state ) }
Simulate calling the function at `function_index`
Simulate calling the function at ` function_index `
state
&AbstractState
function_index
FunctionHandleIndex