11//! The virtual memory representation of the MIR interpreter.
22
33use super :: {
4- Pointer , EvalResult , AllocId , ScalarMaybeUndef , write_target_uint, read_target_uint, Scalar ,
4+ Pointer , InterpResult , AllocId , ScalarMaybeUndef , write_target_uint, read_target_uint, Scalar ,
55 truncate,
66} ;
77
@@ -62,7 +62,7 @@ pub trait AllocationExtra<Tag, MemoryExtra>: ::std::fmt::Debug + Clone {
6262 _alloc : & Allocation < Tag , Self > ,
6363 _ptr : Pointer < Tag > ,
6464 _size : Size ,
65- ) -> EvalResult < ' tcx > {
65+ ) -> InterpResult < ' tcx > {
6666 Ok ( ( ) )
6767 }
6868
@@ -72,7 +72,7 @@ pub trait AllocationExtra<Tag, MemoryExtra>: ::std::fmt::Debug + Clone {
7272 _alloc : & mut Allocation < Tag , Self > ,
7373 _ptr : Pointer < Tag > ,
7474 _size : Size ,
75- ) -> EvalResult < ' tcx > {
75+ ) -> InterpResult < ' tcx > {
7676 Ok ( ( ) )
7777 }
7878
@@ -83,7 +83,7 @@ pub trait AllocationExtra<Tag, MemoryExtra>: ::std::fmt::Debug + Clone {
8383 _alloc : & mut Allocation < Tag , Self > ,
8484 _ptr : Pointer < Tag > ,
8585 _size : Size ,
86- ) -> EvalResult < ' tcx > {
86+ ) -> InterpResult < ' tcx > {
8787 Ok ( ( ) )
8888 }
8989}
@@ -140,7 +140,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
140140 fn check_bounds_ptr (
141141 & self ,
142142 ptr : Pointer < Tag > ,
143- ) -> EvalResult < ' tcx > {
143+ ) -> InterpResult < ' tcx > {
144144 let allocation_size = self . bytes . len ( ) as u64 ;
145145 ptr. check_in_alloc ( Size :: from_bytes ( allocation_size) , InboundsCheck :: Live )
146146 }
@@ -152,7 +152,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
152152 cx : & impl HasDataLayout ,
153153 ptr : Pointer < Tag > ,
154154 size : Size ,
155- ) -> EvalResult < ' tcx > {
155+ ) -> InterpResult < ' tcx > {
156156 // if ptr.offset is in bounds, then so is ptr (because offset checks for overflow)
157157 self . check_bounds_ptr ( ptr. offset ( size, cx) ?)
158158 }
@@ -173,7 +173,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
173173 ptr : Pointer < Tag > ,
174174 size : Size ,
175175 check_defined_and_ptr : bool ,
176- ) -> EvalResult < ' tcx , & [ u8 ] >
176+ ) -> InterpResult < ' tcx , & [ u8 ] >
177177 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
178178 where Extra : AllocationExtra < Tag , MemoryExtra >
179179 {
@@ -201,7 +201,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
201201 cx : & impl HasDataLayout ,
202202 ptr : Pointer < Tag > ,
203203 size : Size ,
204- ) -> EvalResult < ' tcx , & [ u8 ] >
204+ ) -> InterpResult < ' tcx , & [ u8 ] >
205205 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
206206 where Extra : AllocationExtra < Tag , MemoryExtra >
207207 {
@@ -216,7 +216,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
216216 cx : & impl HasDataLayout ,
217217 ptr : Pointer < Tag > ,
218218 size : Size ,
219- ) -> EvalResult < ' tcx , & [ u8 ] >
219+ ) -> InterpResult < ' tcx , & [ u8 ] >
220220 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
221221 where Extra : AllocationExtra < Tag , MemoryExtra >
222222 {
@@ -230,7 +230,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
230230 cx : & impl HasDataLayout ,
231231 ptr : Pointer < Tag > ,
232232 size : Size ,
233- ) -> EvalResult < ' tcx , & mut [ u8 ] >
233+ ) -> InterpResult < ' tcx , & mut [ u8 ] >
234234 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
235235 where Extra : AllocationExtra < Tag , MemoryExtra >
236236 {
@@ -257,7 +257,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
257257 & self ,
258258 cx : & impl HasDataLayout ,
259259 ptr : Pointer < Tag > ,
260- ) -> EvalResult < ' tcx , & [ u8 ] >
260+ ) -> InterpResult < ' tcx , & [ u8 ] >
261261 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
262262 where Extra : AllocationExtra < Tag , MemoryExtra >
263263 {
@@ -284,7 +284,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
284284 ptr : Pointer < Tag > ,
285285 size : Size ,
286286 allow_ptr_and_undef : bool ,
287- ) -> EvalResult < ' tcx >
287+ ) -> InterpResult < ' tcx >
288288 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
289289 where Extra : AllocationExtra < Tag , MemoryExtra >
290290 {
@@ -306,7 +306,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
306306 cx : & impl HasDataLayout ,
307307 ptr : Pointer < Tag > ,
308308 src : & [ u8 ] ,
309- ) -> EvalResult < ' tcx >
309+ ) -> InterpResult < ' tcx >
310310 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
311311 where Extra : AllocationExtra < Tag , MemoryExtra >
312312 {
@@ -322,7 +322,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
322322 ptr : Pointer < Tag > ,
323323 val : u8 ,
324324 count : Size
325- ) -> EvalResult < ' tcx >
325+ ) -> InterpResult < ' tcx >
326326 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
327327 where Extra : AllocationExtra < Tag , MemoryExtra >
328328 {
@@ -346,7 +346,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
346346 cx : & impl HasDataLayout ,
347347 ptr : Pointer < Tag > ,
348348 size : Size
349- ) -> EvalResult < ' tcx , ScalarMaybeUndef < Tag > >
349+ ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > >
350350 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
351351 where Extra : AllocationExtra < Tag , MemoryExtra >
352352 {
@@ -383,7 +383,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
383383 & self ,
384384 cx : & impl HasDataLayout ,
385385 ptr : Pointer < Tag > ,
386- ) -> EvalResult < ' tcx , ScalarMaybeUndef < Tag > >
386+ ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > >
387387 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
388388 where Extra : AllocationExtra < Tag , MemoryExtra >
389389 {
@@ -404,7 +404,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
404404 ptr : Pointer < Tag > ,
405405 val : ScalarMaybeUndef < Tag > ,
406406 type_size : Size ,
407- ) -> EvalResult < ' tcx >
407+ ) -> InterpResult < ' tcx >
408408 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
409409 where Extra : AllocationExtra < Tag , MemoryExtra >
410410 {
@@ -451,7 +451,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
451451 cx : & impl HasDataLayout ,
452452 ptr : Pointer < Tag > ,
453453 val : ScalarMaybeUndef < Tag >
454- ) -> EvalResult < ' tcx >
454+ ) -> InterpResult < ' tcx >
455455 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
456456 where Extra : AllocationExtra < Tag , MemoryExtra >
457457 {
@@ -483,7 +483,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
483483 cx : & impl HasDataLayout ,
484484 ptr : Pointer < Tag > ,
485485 size : Size ,
486- ) -> EvalResult < ' tcx > {
486+ ) -> InterpResult < ' tcx > {
487487 if self . relocations ( cx, ptr, size) . is_empty ( ) {
488488 Ok ( ( ) )
489489 } else {
@@ -502,7 +502,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
502502 cx : & impl HasDataLayout ,
503503 ptr : Pointer < Tag > ,
504504 size : Size ,
505- ) -> EvalResult < ' tcx > {
505+ ) -> InterpResult < ' tcx > {
506506 // Find the start and end of the given range and its outermost relocations.
507507 let ( first, last) = {
508508 // Find all relocations overlapping the given range.
@@ -540,7 +540,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
540540 cx : & impl HasDataLayout ,
541541 ptr : Pointer < Tag > ,
542542 size : Size ,
543- ) -> EvalResult < ' tcx > {
543+ ) -> InterpResult < ' tcx > {
544544 self . check_relocations ( cx, ptr, Size :: ZERO ) ?;
545545 self . check_relocations ( cx, ptr. offset ( size, cx) ?, Size :: ZERO ) ?;
546546 Ok ( ( ) )
@@ -553,7 +553,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
553553 /// Checks that a range of bytes is defined. If not, returns the `ReadUndefBytes`
554554 /// error which will report the first byte which is undefined.
555555 #[ inline]
556- fn check_defined ( & self , ptr : Pointer < Tag > , size : Size ) -> EvalResult < ' tcx > {
556+ fn check_defined ( & self , ptr : Pointer < Tag > , size : Size ) -> InterpResult < ' tcx > {
557557 self . undef_mask . is_range_defined (
558558 ptr. offset ,
559559 ptr. offset + size,
@@ -565,7 +565,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
565565 ptr : Pointer < Tag > ,
566566 size : Size ,
567567 new_state : bool ,
568- ) -> EvalResult < ' tcx > {
568+ ) -> InterpResult < ' tcx > {
569569 if size. bytes ( ) == 0 {
570570 return Ok ( ( ) ) ;
571571 }
0 commit comments