Mercurial > lcfOS
comparison python/ir/function.py @ 253:74c6a20302d5
Added better logging
author | Windel Bouwman |
---|---|
date | Wed, 31 Jul 2013 17:57:03 +0200 |
parents | 63bb40758066 |
children | 225f444019b1 |
comparison
equal
deleted
inserted
replaced
252:c4370696ccc7 | 253:74c6a20302d5 |
---|---|
27 return bb | 27 return bb |
28 raise KeyError(name) | 28 raise KeyError(name) |
29 | 29 |
30 BasicBlocks = property(getBBs) | 30 BasicBlocks = property(getBBs) |
31 | 31 |
32 @property | |
33 def Entry(self): | |
34 return self.BasicBlocks[0] | |
35 | |
32 def check(self): | 36 def check(self): |
33 for bb in self.BasicBlocks: | 37 for bb in self.BasicBlocks: |
34 bb.check() | 38 bb.check() |
39 | |
40 def call(self, *args): | |
41 print(args) | |
42 varmap = {} | |
43 bb = self.Entry | |
44 ip = 0 | |
45 while True: | |
46 i = bb.Instructions[ip] | |
47 ip += 1 | |
48 print(i) | |
49 return | |
50 | |
51 |