Mercurial > lcfOS
diff python/irmach.py @ 268:5ec7580976d9
Op naar tree-IR
author | Windel Bouwman |
---|---|
date | Wed, 14 Aug 2013 20:12:40 +0200 |
parents | 444b9df2ed99 |
children | 5f8c04a8d26b |
line wrap: on
line diff
--- a/python/irmach.py Mon Aug 12 20:14:47 2013 +0200 +++ b/python/irmach.py Wed Aug 14 20:12:40 2013 +0200 @@ -15,9 +15,15 @@ self.instructions = [] -class MachIns: +class AbstractInstruction: """ Absract machine instruction """ - def __init__(self, mi): - self.mi = mi + def __init__(self, assem, src=(), dst=(), jumps=()): + self.assem = assem + self.src = tuple(src) + self.dst = tuple(dst) + self.jumps = tuple(jumps) + + def __repr__(self): + return self.assem + str(self.src) + str(self.dst)