Update interpret step
This commit is contained in:
parent
89f45ed9f3
commit
37a6c04718
@ -119,15 +119,23 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
|
||||
let dst = {
|
||||
let dst = self.eval_operand(dst, None)?;
|
||||
dst.assert_mem_place(self)
|
||||
let mplace = *dst.assert_mem_place(self);
|
||||
match mplace.ptr {
|
||||
Scalar::Ptr(ptr) => ptr,
|
||||
_ => panic!(),
|
||||
}
|
||||
};
|
||||
let src = {
|
||||
let src = self.eval_operand(src, None)?;
|
||||
src.assert_mem_place(self)
|
||||
let mplace = *src.assert_mem_place(self);
|
||||
match mplace.ptr {
|
||||
Scalar::Ptr(ptr) => ptr,
|
||||
_ => panic!(),
|
||||
}
|
||||
};
|
||||
// Not sure how to convert an MPlaceTy<'_, <M as Machine<'_, '_>>::PointerTag>
|
||||
// to a pointer, or OpTy to a size
|
||||
self.memory.copy(src, dst, size, /*nonoverlapping*/ true)?;
|
||||
self.memory.copy(src, dst, size.layout.layout.size, /*nonoverlapping*/ true)?;
|
||||
}
|
||||
|
||||
// Statements we do not track.
|
||||
|
@ -687,6 +687,7 @@ pub(super) fn filtered_statement_span(
|
||||
|
||||
// Retain spans from all other statements
|
||||
StatementKind::FakeRead(_, _) // Not including `ForGuardBinding`
|
||||
| StatementKind::CopyNonOverlapping(..)
|
||||
| StatementKind::Assign(_)
|
||||
| StatementKind::SetDiscriminant { .. }
|
||||
| StatementKind::LlvmInlineAsm(_)
|
||||
|
@ -428,6 +428,7 @@ impl Visitor<'_> for UsedLocals {
|
||||
fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
|
||||
match statement.kind {
|
||||
StatementKind::LlvmInlineAsm(..)
|
||||
| StatementKind::CopyNonOverlapping(..)
|
||||
| StatementKind::Retag(..)
|
||||
| StatementKind::Coverage(..)
|
||||
| StatementKind::FakeRead(..)
|
||||
|
Loading…
Reference in New Issue
Block a user