Pass PlaceTy by reference not value
This commit is contained in:
parent
e915cf45dc
commit
fe0c46d07e
13 changed files with 91 additions and 87 deletions
|
@ -157,7 +157,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
instance: ty::Instance<'tcx>,
|
||||
abi: Abi,
|
||||
args: &[OpTy<'tcx, Self::PointerTag>],
|
||||
ret: Option<(PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
ret: Option<(&PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
unwind: Option<mir::BasicBlock>,
|
||||
) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>>;
|
||||
|
||||
|
@ -168,7 +168,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
fn_val: Self::ExtraFnVal,
|
||||
abi: Abi,
|
||||
args: &[OpTy<'tcx, Self::PointerTag>],
|
||||
ret: Option<(PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
ret: Option<(&PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
unwind: Option<mir::BasicBlock>,
|
||||
) -> InterpResult<'tcx>;
|
||||
|
||||
|
@ -178,7 +178,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
instance: ty::Instance<'tcx>,
|
||||
args: &[OpTy<'tcx, Self::PointerTag>],
|
||||
ret: Option<(PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
ret: Option<(&PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
|
||||
unwind: Option<mir::BasicBlock>,
|
||||
) -> InterpResult<'tcx>;
|
||||
|
||||
|
@ -207,7 +207,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
/// Heap allocations via the `box` keyword.
|
||||
fn box_alloc(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
dest: PlaceTy<'tcx, Self::PointerTag>,
|
||||
dest: &PlaceTy<'tcx, Self::PointerTag>,
|
||||
) -> InterpResult<'tcx>;
|
||||
|
||||
/// Called to read the specified `local` from the `frame`.
|
||||
|
@ -327,7 +327,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
fn retag(
|
||||
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
_kind: mir::RetagKind,
|
||||
_place: PlaceTy<'tcx, Self::PointerTag>,
|
||||
_place: &PlaceTy<'tcx, Self::PointerTag>,
|
||||
) -> InterpResult<'tcx> {
|
||||
Ok(())
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
|||
fn_val: !,
|
||||
_abi: Abi,
|
||||
_args: &[OpTy<$tcx>],
|
||||
_ret: Option<(PlaceTy<$tcx>, mir::BasicBlock)>,
|
||||
_ret: Option<(&PlaceTy<$tcx>, mir::BasicBlock)>,
|
||||
_unwind: Option<mir::BasicBlock>,
|
||||
) -> InterpResult<$tcx> {
|
||||
match fn_val {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue