@@ -439,7 +439,7 @@ impl<'tcx, Tag> Scalar<Tag> {
439
439
Ok ( b as u64 )
440
440
}
441
441
442
- pub fn to_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , u64 > {
442
+ pub fn to_machine_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , u64 > {
443
443
let b = self . to_bits ( cx. data_layout ( ) . pointer_size ) ?;
444
444
Ok ( b as u64 )
445
445
}
@@ -465,7 +465,7 @@ impl<'tcx, Tag> Scalar<Tag> {
465
465
Ok ( b as i64 )
466
466
}
467
467
468
- pub fn to_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , i64 > {
468
+ pub fn to_machine_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , i64 > {
469
469
let sz = cx. data_layout ( ) . pointer_size ;
470
470
let b = self . to_bits ( sz) ?;
471
471
let b = sign_extend ( b, sz) as i128 ;
@@ -592,8 +592,8 @@ impl<'tcx, Tag> ScalarMaybeUndef<Tag> {
592
592
}
593
593
594
594
#[ inline( always) ]
595
- pub fn to_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , u64 > {
596
- self . not_undef ( ) ?. to_usize ( cx)
595
+ pub fn to_machine_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , u64 > {
596
+ self . not_undef ( ) ?. to_machine_usize ( cx)
597
597
}
598
598
599
599
#[ inline( always) ]
@@ -612,8 +612,8 @@ impl<'tcx, Tag> ScalarMaybeUndef<Tag> {
612
612
}
613
613
614
614
#[ inline( always) ]
615
- pub fn to_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , i64 > {
616
- self . not_undef ( ) ?. to_isize ( cx)
615
+ pub fn to_machine_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , i64 > {
616
+ self . not_undef ( ) ?. to_machine_isize ( cx)
617
617
}
618
618
}
619
619
0 commit comments