fn copy_undef_mask(
        &mut self,
        src: Pointer,
        dest: Pointer,
        size: Size,
        repeat: u64,
    ) -> EvalResult<'tcx> {
        // The bits have to be saved locally before writing to dest in case src and dest overlap.
        assert_eq!(size.bytes() as usize as u64, size.bytes());

        let undef_mask = self.get(src.alloc_id)?.undef_mask.clone();
        let dest_allocation = self.get_mut(dest.alloc_id)?;

        for i in 0..size.bytes() {
            let defined = undef_mask.get(src.offset + Size::from_bytes(i));

            for j in 0..repeat {
                dest_allocation.undef_mask.set(
                    dest.offset + Size::from_bytes(i + (size.bytes() * j)),
                    defined
                );
            }
        }

        Ok(())
    }
// FIXME(solson): This is a very naive, slow version.
This is a very naive, slow version.
This is a very naive slow version .
fn copy_undef_mask(
        &mut self,
        src: Pointer,
        dest: Pointer,
        size: Size,
        repeat: u64,
    ) -> EvalResult<'tcx> {
        // The bits have to be saved locally before writing to dest in case src and dest overlap.
        assert_eq!(size.bytes() as usize as u64, size.bytes());
        let undef_mask = self.get(src.alloc_id)?.undef_mask.clone();
        let dest_allocation = self.get_mut(dest.alloc_id)?;
        for i in 0..size.bytes() {
            let defined = undef_mask.get(src.offset + Size::from_bytes(i));
            for j in 0..repeat {
                dest_allocation.undef_mask.set(
                    dest.offset + Size::from_bytes(i + (size.bytes() * j)),
                    defined
                );
            }
        }
        Ok(())
    }
fn copy_undef_mask ( & mut self , src : Pointer , dest : Pointer , size : Size , repeat : u64 , ) -> EvalResult < ' tcx > { // The bits have to be saved locally before writing to dest in case src and dest overlap. assert_eq ! ( size bytes ( ) as usize as u64 size bytes ( ) ) ; let undef_mask = self . get ( src . alloc_id ) ? . undef_mask . clone ( ) ; let dest_allocation = self . get_mut ( dest . alloc_id ) ? ; for i in 0 .. size . bytes ( ) { let defined = undef_mask . get ( src . offset + Size :: from_bytes ( i ) ) ; for j in 0 .. repeat { dest_allocation . undef_mask . set ( dest . offset + Size :: from_bytes ( i + ( size . bytes ( ) * j ) ) , defined ) ; } } Ok ( ( ) ) }
FIXME(solson): This is a very naive, slow version.
FIXME ( solson ) : This is a very naive slow version .
&mut self
src
Pointer
dest
Pointer
size
Size
repeat
u64