pub fn eval_place(&mut self, mir_place: &mir::Place<'tcx>) -> EvalResult<'tcx, PlaceTy<'tcx>> {
        use rustc::mir::Place::*;
        let place = match *mir_place {
            Local(mir::RETURN_PLACE) => PlaceTy {
                place: self.frame().return_place,
                layout: self.layout_of_local(self.cur_frame(), mir::RETURN_PLACE)?,
            },
            Local(local) => PlaceTy {
                place: Place::Local {
                    frame: self.cur_frame(),
                    local,
                },
                layout: self.layout_of_local(self.cur_frame(), local)?,
            },

            Promoted(ref promoted) => {
                let instance = self.frame().instance;
                let op = self.global_to_op(GlobalId {
                    instance,
                    promoted: Some(promoted.0),
                })?;
                let mplace = op.to_mem_place();
                let ty = self.monomorphize(promoted.1, self.substs());
                PlaceTy {
                    place: Place::Ptr(mplace),
                    layout: self.layout_of(ty)?,
                }
            }

            Static(ref static_) => {
                let ty = self.monomorphize(static_.ty, self.substs());
                let layout = self.layout_of(ty)?;
                let instance = ty::Instance::mono(*self.tcx, static_.def_id);
                let cid = GlobalId {
                    instance,
                    promoted: None
                };
                let alloc = Machine::init_static(self, cid)?;
                MPlaceTy::from_aligned_ptr(alloc.into(), layout).into()
            }

            Projection(ref proj) => {
                let place = self.eval_place(&proj.base)?;
                self.place_projection(place, &proj.elem)?
            }
        };

        self.dump_place(place.place);

        Ok(place)
    }
/// Compute a place.  You should only use this if you intend to write into this
/// place; for reading, a more efficient alternative is `eval_place_for_read`.
Compute a place.  You should only use this if you intend to write into this
place; for reading, a more efficient alternative is `eval_place_for_read`.
Compute a place . You should only use this if you intend to write into this place ; for reading a more efficient alternative is ` eval_place_for_read ` .
pub fn eval_place(&mut self, mir_place: &mir::Place<'tcx>) -> EvalResult<'tcx, PlaceTy<'tcx>> {
        use rustc::mir::Place::*;
        let place = match *mir_place {
            Local(mir::RETURN_PLACE) => PlaceTy {
                place: self.frame().return_place,
                layout: self.layout_of_local(self.cur_frame(), mir::RETURN_PLACE)?,
            },
            Local(local) => PlaceTy {
                place: Place::Local {
                    frame: self.cur_frame(),
                    local,
                },
                layout: self.layout_of_local(self.cur_frame(), local)?,
            },
            Promoted(ref promoted) => {
                let instance = self.frame().instance;
                let op = self.global_to_op(GlobalId {
                    instance,
                    promoted: Some(promoted.0),
                })?;
                let mplace = op.to_mem_place();
                let ty = self.monomorphize(promoted.1, self.substs());
                PlaceTy {
                    place: Place::Ptr(mplace),
                    layout: self.layout_of(ty)?,
                }
            }
            Static(ref static_) => {
                let ty = self.monomorphize(static_.ty, self.substs());
                let layout = self.layout_of(ty)?;
                let instance = ty::Instance::mono(*self.tcx, static_.def_id);
                let cid = GlobalId {
                    instance,
                    promoted: None
                };
                let alloc = Machine::init_static(self, cid)?;
                MPlaceTy::from_aligned_ptr(alloc.into(), layout).into()
            }
            Projection(ref proj) => {
                let place = self.eval_place(&proj.base)?;
                self.place_projection(place, &proj.elem)?
            }
        };
        self.dump_place(place.place);
        Ok(place)
    }
pub fn eval_place ( & mut self , mir_place : & mir :: Place < ' tcx > ) -> EvalResult < ' tcx , PlaceTy < ' tcx > > { use rustc :: mir :: Place :: * ; let place = match * mir_place { Local ( mir :: RETURN_PLACE ) => PlaceTy { place : self . frame ( ) . return_place , layout : self . layout_of_local ( self . cur_frame ( ) , mir :: RETURN_PLACE ) ? , } , Local ( local ) => PlaceTy { place : Place :: Local { frame : self . cur_frame ( ) , local , } , layout : self . layout_of_local ( self . cur_frame ( ) , local ) ? , } , Promoted ( ref promoted ) => { let instance = self . frame ( ) . instance ; let op = self . global_to_op ( GlobalId { instance , promoted : Some ( promoted . 0 ) , } ) ? ; let mplace = op . to_mem_place ( ) ; let ty = self . monomorphize ( promoted . 1 , self . substs ( ) ) ; PlaceTy { place : Place :: Ptr ( mplace ) , layout : self . layout_of ( ty ) ? , } } Static ( ref static_ ) => { let ty = self . monomorphize ( static_ . ty , self . substs ( ) ) ; let layout = self . layout_of ( ty ) ? ; let instance = ty :: Instance :: mono ( * self . tcx , static_ . def_id ) ; let cid = GlobalId { instance , promoted : None } ; let alloc = Machine :: init_static ( self , cid ) ? ; MPlaceTy :: from_aligned_ptr ( alloc . into ( ) , layout ) . into ( ) } Projection ( ref proj ) => { let place = self . eval_place ( & proj . base ) ? ; self . place_projection ( place , & proj . elem ) ? } } ; self . dump_place ( place . place ) ; Ok ( place ) }
Compute a place.
Compute a place .
&mut self
mir_place
&mir::Place<'tcx>