Mercurial > lcfOS
diff python/ir/module.py @ 156:1b4a85bdd99c
change types
author | Windel Bouwman |
---|---|
date | Sun, 03 Mar 2013 15:50:34 +0100 |
parents | b28a11c01dbe |
children | 8f3924b6076e |
line wrap: on
line diff
--- a/python/ir/module.py Sun Mar 03 13:20:03 2013 +0100 +++ b/python/ir/module.py Sun Mar 03 15:50:34 2013 +0100 @@ -7,7 +7,6 @@ self.functions = [] # Do functions come out of symbol table? self.globals_ = [] # TODO: are globals in symbol table? self.symtable = SymbolTable() - Globals = property(lambda self: self.globals_) Functions = property(lambda self: self.functions) Identifier = property(lambda self: self.identifier) @@ -19,17 +18,15 @@ self.function = function class Function: - def __init__(self, functiontype, name, module): + def __init__(self, name, functiontype): super().__init__() + self.name = name self.functiontype = functiontype - self.name = name - self.module = module self.module.Functions.append(self) self.basicblocks = [] self.arguments = [] # Construct formal arguments depending on function type - BasicBlocks = property(lambda self: self.basicblocks) Arguments = property(lambda self: self.arguments) ReturnType = property(lambda self: self.functiontype.returnType)