fn preserves_for_call_context(
        &self,
        callees: Vec<(u64, NodeIndex)>,
    ) -> Vec<(NodeIndex, Vec<String>)> {
        let mut result: Vec<(NodeIndex, Vec<String>)> = Vec::new();

        for (callee, node) in callees.into_iter() {
            let mut preserves: Vec<String> = Vec::new();
            if let Some(rfn) = self.rmod.functions.get(&callee) {
                // Callee is man made function
                for bind in rfn.bindings().into_iter() {
                    if bind.is_preserved() {
                        preserves.push(bind.name().to_string());
                    }
                }
                result.push((node, preserves));
            } else {
                // Callee is library function
                let bp_name = vec![self.sp_name.clone().unwrap_or(String::new())];
                result.push((node, bp_name));
            }
        }

        result
    }
// Get callee's node and its preserved registers
Get callee's node and its preserved registers
Get callee ' s node and its preserved registers
fn preserves_for_call_context(
        &self,
        callees: Vec<(u64, NodeIndex)>,
    ) -> Vec<(NodeIndex, Vec<String>)> {
        let mut result: Vec<(NodeIndex, Vec<String>)> = Vec::new();
        for (callee, node) in callees.into_iter() {
            let mut preserves: Vec<String> = Vec::new();
            if let Some(rfn) = self.rmod.functions.get(&callee) {
                // Callee is man made function
                for bind in rfn.bindings().into_iter() {
                    if bind.is_preserved() {
                        preserves.push(bind.name().to_string());
                    }
                }
                result.push((node, preserves));
            } else {
                // Callee is library function
                let bp_name = vec![self.sp_name.clone().unwrap_or(String::new())];
                result.push((node, bp_name));
            }
        }
        result
    }
fn preserves_for_call_context ( & self , callees : Vec < ( u64 , NodeIndex ) > , ) -> Vec < ( NodeIndex , Vec < String > ) > { let mut result : Vec < ( NodeIndex , Vec < String > ) > = Vec :: new ( ) ; for ( callee , node ) in callees . into_iter ( ) { let mut preserves : Vec < String > = Vec :: new ( ) ; if let Some ( rfn ) = self . rmod . functions . get ( & callee ) { // Callee is man made function for bind in rfn . bindings ( ) . into_iter ( ) { if bind . is_preserved ( ) { preserves . push ( bind . name ( ) . to_string ( ) ) ; } } result . push ( ( node , preserves ) ) ; } else { // Callee is library function let bp_name = vec ! [ self sp_name clone ( ) unwrap_or ( String new ( ) ) ] ; result . push ( ( node , bp_name ) ) ; } } result }
Get callee's node and its preserved registers
Get callee ' s node and its preserved registers
&self
callees
Vec<(u64, NodeIndex)>
&self
callees
Vec<(u64, NodeIndex)>