take Lis index from rd in copy_var (#3298)

This commit is contained in:
Mark Thom
2026-04-21 14:31:53 -07:00
parent 974722bc1c
commit 010b00f349

View File

@@ -384,7 +384,6 @@ impl<T: CopierTarget> CopyTermState<T> {
}
fn copy_var(&mut self, addr: HeapCellValue) -> Result<(), AllocError> {
let index = addr.get_value() as usize;
let rd = self.target.deref(addr);
let ra = self.target.store(rd);
@@ -397,6 +396,7 @@ impl<T: CopierTarget> CopyTermState<T> {
}
}
(HeapCellValueTag::Lis, h) => {
let index = rd.get_value() as usize;
if h >= self.old_h && self.target[index].get_mark_bit() {
*self.value_at_scan() = heap_loc_as_cell!(
if ra.get_forwarding_bit() {