annotate python/ir/basicblock.py @ 147:4e79484a9d47

Moved core to ir folder
author Windel Bouwman
date Fri, 22 Feb 2013 10:33:48 +0100
parents python/ppci/core/basicblock.py@9e552d34bd60
children
rev   line source
110
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
1 from .value import Value
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
2
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
3 class BasicBlock(Value):
99
windel
parents: 95
diff changeset
4 """
windel
parents: 95
diff changeset
5 A basic block represents a sequence of instructions without
windel
parents: 95
diff changeset
6 jumps and branches.
windel
parents: 95
diff changeset
7 """
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
8 def __init__(self):
110
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
9 super().__init__()
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
10 self.instructions = []
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
11 self.name = None
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
12 def getInstructions(self):
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
13 return self.instructions
9e552d34bd60 Work on compiler
Windel Bouwman
parents: 99
diff changeset
14 Instructions = property(getInstructions)
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
15