@@ -154,10 +154,10 @@ impl<Tag, Extra> Allocation<Tag, Extra> {
154154 }
155155
156156 /// Looks at a slice which may describe uninitialized bytes or describe a relocation. This differs
157- /// from `get_bytes_with_undef_and_ptr ` in that it does no relocation checks (even on the
157+ /// from `get_bytes_with_uninit_and_ptr ` in that it does no relocation checks (even on the
158158 /// edges) at all. It further ignores `AllocationExtra` callbacks.
159159 /// This must not be used for reads affecting the interpreter execution.
160- pub fn inspect_with_undef_and_ptr_outside_interpreter ( & self , range : Range < usize > ) -> & [ u8 ] {
160+ pub fn inspect_with_uninit_and_ptr_outside_interpreter ( & self , range : Range < usize > ) -> & [ u8 ] {
161161 & self . bytes [ range]
162162 }
163163
@@ -194,7 +194,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
194194
195195 /// The last argument controls whether we error out when there are uninitialized
196196 /// or pointer bytes. You should never call this, call `get_bytes` or
197- /// `get_bytes_with_undef_and_ptr ` instead,
197+ /// `get_bytes_with_uninit_and_ptr ` instead,
198198 ///
199199 /// This function also guarantees that the resulting pointer will remain stable
200200 /// even when new allocations are pushed to the `HashMap`. `copy_repeatedly` relies
@@ -244,7 +244,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
244244 ///
245245 /// It is the caller's responsibility to check bounds and alignment beforehand.
246246 #[ inline]
247- pub fn get_bytes_with_undef_and_ptr (
247+ pub fn get_bytes_with_uninit_and_ptr (
248248 & self ,
249249 cx : & impl HasDataLayout ,
250250 ptr : Pointer < Tag > ,
@@ -302,19 +302,19 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
302302 }
303303
304304 /// Validates that `ptr.offset` and `ptr.offset + size` do not point to the middle of a
305- /// relocation. If `allow_ptr_and_undef ` is `false`, also enforces that the memory in the
305+ /// relocation. If `allow_uninit_and_ptr ` is `false`, also enforces that the memory in the
306306 /// given range contains neither relocations nor uninitialized bytes.
307307 pub fn check_bytes (
308308 & self ,
309309 cx : & impl HasDataLayout ,
310310 ptr : Pointer < Tag > ,
311311 size : Size ,
312- allow_ptr_and_undef : bool ,
312+ allow_uninit_and_ptr : bool ,
313313 ) -> InterpResult < ' tcx > {
314314 // Check bounds and relocations on the edges.
315- self . get_bytes_with_undef_and_ptr ( cx, ptr, size) ?;
315+ self . get_bytes_with_uninit_and_ptr ( cx, ptr, size) ?;
316316 // Check uninit and ptr.
317- if !allow_ptr_and_undef {
317+ if !allow_uninit_and_ptr {
318318 self . check_init ( ptr, size) ?;
319319 self . check_relocations ( cx, ptr, size) ?;
320320 }
@@ -361,7 +361,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
361361 size : Size ,
362362 ) -> InterpResult < ' tcx , ScalarMaybeUninit < Tag > > {
363363 // `get_bytes_unchecked` tests relocation edges.
364- let bytes = self . get_bytes_with_undef_and_ptr ( cx, ptr, size) ?;
364+ let bytes = self . get_bytes_with_uninit_and_ptr ( cx, ptr, size) ?;
365365 // Uninit check happens *after* we established that the alignment is correct.
366366 // We must not return `Ok()` for unaligned pointers!
367367 if self . is_init ( ptr, size) . is_err ( ) {
@@ -594,7 +594,7 @@ impl InitMaskCompressed {
594594/// Transferring the initialization mask to other allocations.
595595impl < Tag , Extra > Allocation < Tag , Extra > {
596596 /// Creates a run-length encoding of the initialization mask.
597- pub fn compress_undef_range ( & self , src : Pointer < Tag > , size : Size ) -> InitMaskCompressed {
597+ pub fn compress_uninit_range ( & self , src : Pointer < Tag > , size : Size ) -> InitMaskCompressed {
598598 // Since we are copying `size` bytes from `src` to `dest + i * size` (`for i in 0..repeat`),
599599 // a naive initialization mask copying algorithm would repeatedly have to read the initialization mask from
600600 // the source and write it to the destination. Even if we optimized the memory accesses,
@@ -636,8 +636,8 @@ impl<Tag, Extra> Allocation<Tag, Extra> {
636636 size : Size ,
637637 repeat : u64 ,
638638 ) {
639- // An optimization where we can just overwrite an entire range of definedness bits if
640- // they are going to be uniformly `1` or `0`.
639+ // An optimization where we can just overwrite an entire range of initialization
640+ // bits if they are going to be uniformly `1` or `0`.
641641 if defined. ranges . len ( ) <= 1 {
642642 self . init_mask . set_range_inbounds (
643643 dest. offset ,
0 commit comments