Mercurial > lcfOS
view 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 source
class MachProgram: pass class MachFunction: def __init__(self, name): self.name = name self.entry = None class MachBlock: def __init__(self): self.instructions = [] class AbstractInstruction: """ Absract machine instruction """ 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)