105
|
1
|
|
2 class Argument:
|
|
3 def __init__(self, argtype, name, function):
|
|
4 self.t = argtype
|
|
5 self.name = name
|
|
6 self.function = function
|
70
|
7
|
|
8 class Function:
|
104
|
9 def __init__(self, functiontype, name, module):
|
|
10 self.functiontype = functiontype
|
|
11 self.name = name
|
|
12 self.module = module
|
105
|
13 self.basicblocks = []
|
|
14 self.arguments = []
|
|
15 # Construct formal arguments depending on function type
|
70
|
16
|
105
|
17
|
|
18 BasicBlocks = property(lambda self: self.basicblocks)
|
|
19 Arguments = property(lambda self: self.arguments)
|
|
20 ReturnType = property(lambda self: self.functiontype.returnType)
|
|
21 FunctionType = property(lambda self: self.functiontype)
|
|
22
|