comparison python/ir/function.py @ 173:c1d2b6b9f9a7

Rework into passes
author Windel Bouwman
date Fri, 19 Apr 2013 12:42:21 +0200
parents 5a7d37d615ee
children 460db5669efa
comparison
equal deleted inserted replaced
172:5a7d37d615ee 173:c1d2b6b9f9a7
4 def __init__(self, name): 4 def __init__(self, name):
5 self.name = name 5 self.name = name
6 self.bbs = [] 6 self.bbs = []
7 self.entry = None 7 self.entry = None
8 def __repr__(self): 8 def __repr__(self):
9 return 'FUNC {0}, entry:{1}'.format(self.name, self.entry) 9 return 'Function {0}'.format(self.name)
10 def addBB(self, bb): 10 def addBB(self, bb):
11 self.bbs.append(bb) 11 self.bbs.append(bb)
12 def getBBs(self): 12 def getBBs(self):
13 return self.bbs 13 return self.bbs
14 BasicBlocks = property(getBBs) 14 BasicBlocks = property(getBBs)