Class Func

Inheritance Relationships

Base Types

Class Documentation

class Func : public seq::BaseFunc, public seq::Generic, public seq::SrcObject

Functions in a program are represented by this class.

Public Functions

Func()
Block *getBlock()
std::string genericName()
void addCachedRealized(std::vector<types::Type *> types, Generic *x)
Func *realize(std::vector<types::Type *> types)
std::vector<types::Type *> deduceTypesFromArgTypes(std::vector<types::Type *> argTypes)
std::vector<Expr *> rectifyCallArgs(std::vector<Expr *> args, std::vector<std::string> names, bool methodCall = false)
void setEnclosingFunc(Func *parentFunc)
void sawReturn(Return *ret)
void sawYield(Yield *yield)
void addAttribute(std::string attr)
std::vector<std::string> getAttributes()
bool hasAttribute(const std::string &attr)
void resolveTypes()
void codegen(llvm::Module *module)
void codegenReturn(llvm::Value *val, types::Type *type, llvm::BasicBlock *&block, bool dryrun = false)
void codegenYield(llvm::Value *val, types::Type *type, llvm::BasicBlock *&block, bool empty = false, bool dryrun = false)
Value *codegenYieldExpr(llvm::BasicBlock *&block, bool suspend = true)
bool isGen()
Var *getArgVar(std::string name)
types::FuncType *getFuncType()
void setExternal()
void setIns(std::vector<types::Type *> inTypes)
void setOut(types::Type *outType)
void setDefaults(std::vector<Expr *> defaultArgs)
void setName(std::string name)
std::vector<std::string> getArgNames()
void setArgNames(std::vector<std::string> argNames)
Func *clone(Generic *ref)

Public Static Functions

Func *getBuiltin(const std::string &name)