From b01d6a487337863e0d0cb3b17acf5322c9a27635 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Sun, 25 Jul 2021 23:58:17 -0700 Subject: [PATCH] cc: fix bug with regbank snap --- tools/cc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/cc.py b/tools/cc.py index 6a17b16..6236b11 100644 --- a/tools/cc.py +++ b/tools/cc.py @@ -219,7 +219,9 @@ class RegBank: self.loaded(var1, reg0) def snap(self): - return dict(self.vars), dict(self.cleanup) + cleanup = collections.defaultdict(list) + cleanup.update({r: list(c) for r, c in self.cleanup.items()}) + return dict(self.vars), cleanup def restore(self, snap): self.reset()