Mercurial > lcfOS
comparison python/irmach.py @ 269:5f8c04a8d26b
Towards better modularity
author | Windel Bouwman |
---|---|
date | Sun, 18 Aug 2013 17:43:18 +0200 |
parents | 5ec7580976d9 |
children | cdc76d183bcc |
comparison
equal
deleted
inserted
replaced
268:5ec7580976d9 | 269:5f8c04a8d26b |
---|---|
1 | 1 |
2 | 2 """ |
3 class MachProgram: | 3 Abstract assembly language instructions |
4 pass | 4 """ |
5 | |
6 | |
7 class MachFunction: | |
8 def __init__(self, name): | |
9 self.name = name | |
10 self.entry = None | |
11 | |
12 | |
13 class MachBlock: | |
14 def __init__(self): | |
15 self.instructions = [] | |
16 | 5 |
17 | 6 |
18 class AbstractInstruction: | 7 class AbstractInstruction: |
19 """ Absract machine instruction """ | 8 """ Absract machine instruction """ |
20 def __init__(self, assem, src=(), dst=(), jumps=()): | 9 def __init__(self, assem, src=(), dst=(), jumps=()): |