annotate python/ppci/core/function.py @ 105:6a303f835c6d

Removed compilers directory
author Windel Bouwman
date Mon, 31 Dec 2012 17:35:17 +0100
parents ed230e947dc6
children f2d980eef509
rev   line source
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
1
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
2 class Argument:
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
3 def __init__(self, argtype, name, function):
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
4 self.t = argtype
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
5 self.name = name
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
6 self.function = function
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
7
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
8 class Function:
104
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
9 def __init__(self, functiontype, name, module):
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
10 self.functiontype = functiontype
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
11 self.name = name
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
12 self.module = module
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
13 self.basicblocks = []
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
14 self.arguments = []
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
15 # Construct formal arguments depending on function type
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
16
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
17
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
18 BasicBlocks = property(lambda self: self.basicblocks)
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
19 Arguments = property(lambda self: self.arguments)
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
20 ReturnType = property(lambda self: self.functiontype.returnType)
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
21 FunctionType = property(lambda self: self.functiontype)
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
22