Mercurial > lcfOS
diff 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 |
line wrap: on
line diff
--- a/python/ppci/core/function.py Sun Dec 30 22:31:55 2012 +0100 +++ b/python/ppci/core/function.py Mon Dec 31 17:35:17 2012 +0100 @@ -1,7 +1,22 @@ + +class Argument: + def __init__(self, argtype, name, function): + self.t = argtype + self.name = name + self.function = function class Function: def __init__(self, functiontype, name, module): self.functiontype = functiontype self.name = name self.module = module + 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) + FunctionType = property(lambda self: self.functiontype) +