Mercurial > lcfOS
view python/irmach.py @ 270:cdc76d183bcc
first register allocator
author | Windel Bouwman |
---|---|
date | Mon, 19 Aug 2013 21:14:28 +0200 |
parents | 5f8c04a8d26b |
children | ea93e0a7a31e |
line wrap: on
line source
""" Abstract assembly language instructions. This is the second intermediate representation. Instructions are selected and scheduled at this stage. """ 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)