simplify detection of cycles in printer

This commit is contained in:
Mark Thom
2018-05-05 13:20:06 -06:00
parent 81a199836d
commit 885d7c04e3
5 changed files with 15 additions and 63 deletions

View File

@@ -190,7 +190,7 @@ impl<'a, Formatter: HCValueFormatter, Outputter: HCValueOutputter>
fn print_offset(&mut self, addr: Addr) {
match addr {
Addr::HeapCell(h) | Addr::Lis(h) =>
Addr::HeapCell(h) | Addr::Lis(h) | Addr::Str(h) =>
self.outputter.append(format!("_{}", h).as_str()),
Addr::StackCell(fr, sc) =>
self.outputter.append(format!("s_{}_{}", fr, sc).as_str()),