add atts.pl, various fixes

This commit is contained in:
Mark Thom
2019-01-30 21:31:48 -07:00
parent 4f87fb8535
commit fcffb90549
12 changed files with 261 additions and 45 deletions

View File

@@ -373,6 +373,8 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter>
fn offset_as_string(&self, addr: Addr) -> Option<String> {
match addr {
Addr::AttrVar(h, _) =>
Some(format!("_{}", h + 1)),
Addr::HeapCell(h) | Addr::Lis(h) | Addr::Str(h) =>
Some(format!("_{}", h)),
Addr::StackCell(fr, sc) =>