interpret: make write functions generic over the place type

This commit is contained in:
Ralf Jung
2023-07-25 22:04:02 +02:00
parent 4fc6b33474
commit 00fb45dccd
26 changed files with 243 additions and 213 deletions

View File

@@ -198,7 +198,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
} else {
// Write the src to the first element.
let first = self.project_index(&dest, 0)?;
self.copy_op(&src, &first.into(), /*allow_transmute*/ false)?;
self.copy_op(&src, &first, /*allow_transmute*/ false)?;
// This is performance-sensitive code for big static/const arrays! So we
// avoid writing each operand individually and instead just make many copies