comparison python/ir/module.py @ 230:88a1e0baef65

Added some tests for IR-code
author Windel Bouwman
date Sat, 13 Jul 2013 19:53:44 +0200
parents d77cb5962cc5
children 63bb40758066
comparison
equal deleted inserted replaced
229:51d5ed1bd503 230:88a1e0baef65
39 39
40 def getFunctions(self): 40 def getFunctions(self):
41 return self.funcs 41 return self.funcs
42 Functions = property(getFunctions) 42 Functions = property(getFunctions)
43 43
44 def findFunction(self, name):
45 for f in self.funcs:
46 if f.name == name:
47 return f
48 raise KeyError(name)
49
44 def dump(self): 50 def dump(self):
45 print(self) 51 print(self)
46 for v in self.Variables: 52 for v in self.Variables:
47 print(' ', v) 53 print(' ', v)
48 for fn in self.Functions: 54 for fn in self.Functions: