Mercurial > lcfOS
annotate python/irmach.py @ 269:5f8c04a8d26b
Towards better modularity
author | Windel Bouwman |
---|---|
date | Sun, 18 Aug 2013 17:43:18 +0200 |
parents | 5ec7580976d9 |
children | cdc76d183bcc |
rev | line source |
---|---|
261 | 1 |
269 | 2 """ |
3 Abstract assembly language instructions | |
4 """ | |
261 | 5 |
6 | |
268 | 7 class AbstractInstruction: |
261 | 8 """ Absract machine instruction """ |
268 | 9 def __init__(self, assem, src=(), dst=(), jumps=()): |
10 self.assem = assem | |
11 self.src = tuple(src) | |
12 self.dst = tuple(dst) | |
13 self.jumps = tuple(jumps) | |
14 | |
15 def __repr__(self): | |
16 return self.assem + str(self.src) + str(self.dst) | |
261 | 17 |
18 |