Mercurial > lcfOS
view python/ir/function.py @ 190:65dda7e7e8bd
Disable test with qt
author | Windel Bouwman |
---|---|
date | Sat, 25 May 2013 15:15:42 +0200 |
parents | 460db5669efa |
children | d77cb5962cc5 |
line wrap: on
line source
from .basicblock import BasicBlock class Function: def __init__(self, name): self.name = name self.bbs = [] self.entry = None def __repr__(self): return 'Function {0}'.format(self.name) def addBB(self, bb): self.bbs.append(bb) bb.parent = self def removeBasicBlock(self, bb): self.bbs.remove(bb) bb.parent = None def getBBs(self): return self.bbs BasicBlocks = property(getBBs)