Mercurial > lcfOS
comparison 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 |
comparison
equal
deleted
inserted
replaced
267:e7c8f7eb3f59 | 268:5ec7580976d9 |
---|---|
13 class MachBlock: | 13 class MachBlock: |
14 def __init__(self): | 14 def __init__(self): |
15 self.instructions = [] | 15 self.instructions = [] |
16 | 16 |
17 | 17 |
18 class MachIns: | 18 class AbstractInstruction: |
19 """ Absract machine instruction """ | 19 """ Absract machine instruction """ |
20 def __init__(self, mi): | 20 def __init__(self, assem, src=(), dst=(), jumps=()): |
21 self.mi = mi | 21 self.assem = assem |
22 self.src = tuple(src) | |
23 self.dst = tuple(dst) | |
24 self.jumps = tuple(jumps) | |
25 | |
26 def __repr__(self): | |
27 return self.assem + str(self.src) + str(self.dst) | |
22 | 28 |
23 | 29 |