repair cyclic PStrLoc handling in heap_print.rs

This commit is contained in:
Mark Thom
2025-04-18 00:03:33 -07:00
committed by Mark Thom
parent f3cd6326a3
commit 4644ea2404
2 changed files with 7 additions and 6 deletions

View File

@@ -879,7 +879,12 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
} else {
debug_assert!(cell.is_ref());
let h = cell.get_value() as usize;
let h = if cell.get_tag() == HeapCellValueTag::PStrLoc {
self.iter.focus().value()
} else {
cell.get_value()
} as usize;
self.iter.push_stack(IterStackLoc::iterable_loc(
h,
HeapOrStackTag::Heap,
@@ -909,7 +914,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
orig_cell = cell;
continue;
}
}
};
}
}

View File

@@ -731,10 +731,6 @@ impl MachineState {
)
);
for var in term_write_result.var_dict.values_mut() {
*var = heap_bound_deref(&self.heap, *var);
}
let mut var_list = Vec::with_capacity(singleton_var_set.len());
for (var_name, addr) in term_write_result.var_dict {