@@ -715,9 +715,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
715715 }
716716
717717 /// Dereference a pointer operand to a place using `layout` instead of the pointer's declared type
718- fn deref_operand_as (
718+ fn deref_pointer_as (
719719 & self ,
720- op : & OpTy < ' tcx , Provenance > ,
720+ op : & impl Readable < ' tcx , Provenance > ,
721721 layout : TyAndLayout < ' tcx > ,
722722 ) -> InterpResult < ' tcx , MPlaceTy < ' tcx , Provenance > > {
723723 let this = self . eval_context_ref ( ) ;
@@ -746,15 +746,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
746746 }
747747
748748 /// Calculates the MPlaceTy given the offset and layout of an access on an operand
749- fn deref_operand_and_offset (
749+ fn deref_pointer_and_offset (
750750 & self ,
751- op : & OpTy < ' tcx , Provenance > ,
751+ op : & impl Readable < ' tcx , Provenance > ,
752752 offset : u64 ,
753753 base_layout : TyAndLayout < ' tcx > ,
754754 value_layout : TyAndLayout < ' tcx > ,
755755 ) -> InterpResult < ' tcx , MPlaceTy < ' tcx , Provenance > > {
756756 let this = self . eval_context_ref ( ) ;
757- let op_place = this. deref_operand_as ( op, base_layout) ?;
757+ let op_place = this. deref_pointer_as ( op, base_layout) ?;
758758 let offset = Size :: from_bytes ( offset) ;
759759
760760 // Ensure that the access is within bounds.
@@ -763,28 +763,28 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
763763 Ok ( value_place)
764764 }
765765
766- fn read_scalar_at_offset (
766+ fn deref_pointer_and_read (
767767 & self ,
768- op : & OpTy < ' tcx , Provenance > ,
768+ op : & impl Readable < ' tcx , Provenance > ,
769769 offset : u64 ,
770770 base_layout : TyAndLayout < ' tcx > ,
771771 value_layout : TyAndLayout < ' tcx > ,
772772 ) -> InterpResult < ' tcx , Scalar < Provenance > > {
773773 let this = self . eval_context_ref ( ) ;
774- let value_place = this. deref_operand_and_offset ( op, offset, base_layout, value_layout) ?;
774+ let value_place = this. deref_pointer_and_offset ( op, offset, base_layout, value_layout) ?;
775775 this. read_scalar ( & value_place)
776776 }
777777
778- fn write_scalar_at_offset (
778+ fn deref_pointer_and_write (
779779 & mut self ,
780- op : & OpTy < ' tcx , Provenance > ,
780+ op : & impl Readable < ' tcx , Provenance > ,
781781 offset : u64 ,
782782 value : impl Into < Scalar < Provenance > > ,
783783 base_layout : TyAndLayout < ' tcx > ,
784784 value_layout : TyAndLayout < ' tcx > ,
785785 ) -> InterpResult < ' tcx , ( ) > {
786786 let this = self . eval_context_mut ( ) ;
787- let value_place = this. deref_operand_and_offset ( op, offset, base_layout, value_layout) ?;
787+ let value_place = this. deref_pointer_and_offset ( op, offset, base_layout, value_layout) ?;
788788 this. write_scalar ( value, & value_place)
789789 }
790790
0 commit comments