pub fn force_allocation(
        &mut self,
        place: PlaceTy<'tcx>,
    ) -> EvalResult<'tcx, MPlaceTy<'tcx>> {
        let mplace = match place.place {
            Place::Local { frame, local } => {
                // FIXME: Consider not doing anything for a ZST, and just returning
                // a fake pointer?

                // We need the layout of the local.  We can NOT use the layout we got,
                // that might e.g. be a downcast variant!
                let local_layout = self.layout_of_local(frame, local)?;
                // Make sure it has a place
                let rval = *self.stack[frame].locals[local].access()?;
                let mplace = self.allocate_op(OpTy { op: rval, layout: local_layout })?.mplace;
                // This might have allocated the flag
                *self.stack[frame].locals[local].access_mut()? =
                    Operand::Indirect(mplace);
                // done
                mplace
            }
            Place::Ptr(mplace) => mplace
        };
        // Return with the original layout, so that the caller can go on
        Ok(MPlaceTy { mplace, layout: place.layout })
    }
/// Make sure that a place is in memory, and return where it is.
/// This is essentially `force_to_memplace`.
Make sure that a place is in memory, and return where it is.
This is essentially `force_to_memplace`.
Make sure that a place is in memory and return where it is . This is essentially ` force_to_memplace ` .
pub fn force_allocation(
        &mut self,
        place: PlaceTy<'tcx>,
    ) -> EvalResult<'tcx, MPlaceTy<'tcx>> {
        let mplace = match place.place {
            Place::Local { frame, local } => {
                // FIXME: Consider not doing anything for a ZST, and just returning
                // a fake pointer?
                // We need the layout of the local.  We can NOT use the layout we got,
                // that might e.g. be a downcast variant!
                let local_layout = self.layout_of_local(frame, local)?;
                // Make sure it has a place
                let rval = *self.stack[frame].locals[local].access()?;
                let mplace = self.allocate_op(OpTy { op: rval, layout: local_layout })?.mplace;
                // This might have allocated the flag
                *self.stack[frame].locals[local].access_mut()? =
                    Operand::Indirect(mplace);
                // done
                mplace
            }
            Place::Ptr(mplace) => mplace
        };
        // Return with the original layout, so that the caller can go on
        Ok(MPlaceTy { mplace, layout: place.layout })
    }
pub fn force_allocation ( & mut self , place : PlaceTy < ' tcx > , ) -> EvalResult < ' tcx , MPlaceTy < ' tcx > > { let mplace = match place . place { Place :: Local { frame , local } => { // FIXME: Consider not doing anything for a ZST, and just returning // a fake pointer? // We need the layout of the local.  We can NOT use the layout we got, // that might e.g. be a downcast variant! let local_layout = self . layout_of_local ( frame , local ) ? ; // Make sure it has a place let rval = * self . stack [ frame ] . locals [ local ] . access ( ) ? ; let mplace = self . allocate_op ( OpTy { op : rval , layout : local_layout } ) ? . mplace ; // This might have allocated the flag * self . stack [ frame ] . locals [ local ] . access_mut ( ) ? = Operand :: Indirect ( mplace ) ; // done mplace } Place :: Ptr ( mplace ) => mplace } ; // Return with the original layout, so that the caller can go on Ok ( MPlaceTy { mplace , layout : place . layout } ) }
Make sure that a place is in memory, and return where it is.
Make sure that a place is in memory and return where it is .
&mut self
place
PlaceTy<'tcx>