Finish garbage collected heap

This commit adds unit tests for garbage collection as well as a
deep copy implementation for cons which fully deep copies the whole
tree and a clone implementation for Datum which deep copies cons.

Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
Ava Apples Affine 2025-07-28 23:02:06 +00:00
parent 524f79733c
commit 2392d5c2fa
2 changed files with 104 additions and 11 deletions

View file

@ -102,7 +102,7 @@ impl VM {
Address::Oper3 => &self.oper[2],
Address::Oper4 => &self.oper[3],
Address::Stack => &self.stack[$oper.1],
Address::Numer => e!("cannot access constant numeric"),
Address::Numer => e!("cannot access constant numeric data"),
Address::Instr => e!("bad access to instruction data"),
}
};