interpret: remove MemoryExtra in favor of giving access to the Machine
This commit is contained in:
parent
15a242a432
commit
f0ec783bf9
15 changed files with 194 additions and 246 deletions
|
@ -225,7 +225,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
|
||||
if length == 0 {
|
||||
// Nothing to copy... but let's still make sure that `dest` as a place is valid.
|
||||
self.get_alloc_mut(&dest)?;
|
||||
self.get_place_alloc_mut(&dest)?;
|
||||
} else {
|
||||
// Write the src to the first element.
|
||||
let first = self.mplace_field(&dest, 0)?;
|
||||
|
@ -241,7 +241,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
// that place might be more aligned than its type mandates (a `u8` array could
|
||||
// be 4-aligned if it sits at the right spot in a struct). Instead we use
|
||||
// `first.layout.align`, i.e., the alignment given by the type.
|
||||
self.memory.copy_repeatedly(
|
||||
self.mem_copy_repeatedly(
|
||||
first_ptr,
|
||||
first.align,
|
||||
rest_ptr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue