Mercurial > lcfOS
diff 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 |
line wrap: on
line diff
--- a/python/ir/function.py Tue Jul 30 17:57:46 2013 +0200 +++ b/python/ir/function.py Wed Jul 31 17:57:03 2013 +0200 @@ -29,6 +29,23 @@ BasicBlocks = property(getBBs) + @property + def Entry(self): + return self.BasicBlocks[0] + def check(self): for bb in self.BasicBlocks: bb.check() + + def call(self, *args): + print(args) + varmap = {} + bb = self.Entry + ip = 0 + while True: + i = bb.Instructions[ip] + ip += 1 + print(i) + return + +