pub fn register(&mut self, sig: &ir::Signature) -> VMSharedSignatureIndex {
        let len = self.signature_hash.len();
        match self.signature_hash.entry(sig.clone()) {
            hash_map::Entry::Occupied(entry) => *entry.get(),
            hash_map::Entry::Vacant(entry) => {
                let sig_id = VMSharedSignatureIndex::new(cast::u32(len).unwrap());
                entry.insert(sig_id);
                sig_id
            }
        }
    }
/// Register a signature and return its unique index.
Register a signature and return its unique index.
Register a signature and return its unique index .
pub fn register(&mut self, sig: &ir::Signature) -> VMSharedSignatureIndex {
        let len = self.signature_hash.len();
        match self.signature_hash.entry(sig.clone()) {
            hash_map::Entry::Occupied(entry) => *entry.get(),
            hash_map::Entry::Vacant(entry) => {
                let sig_id = VMSharedSignatureIndex::new(cast::u32(len).unwrap());
                entry.insert(sig_id);
                sig_id
            }
        }
    }
pub fn register ( & mut self , sig : & ir :: Signature ) -> VMSharedSignatureIndex { let len = self . signature_hash . len ( ) ; match self . signature_hash . entry ( sig . clone ( ) ) { hash_map :: Entry :: Occupied ( entry ) => * entry . get ( ) , hash_map :: Entry :: Vacant ( entry ) => { let sig_id = VMSharedSignatureIndex :: new ( cast :: u32 ( len ) . unwrap ( ) ) ; entry . insert ( sig_id ) ; sig_id } } }
Register a signature and return its unique index.
Register a signature and return its unique index .
&mut self
sig
&ir::Signature