X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=blobdiff_plain;f=src%2FAST%2Ffunction.h;h=3f2a1a9310f2dd077cce62762535455e25c09edb;hp=65a4b29fe3607bc75774808ac65ce4e990b06685;hb=c507619d06bc6fbddc5fc26016be9bb47daa0ae0;hpb=fc1dd990c4a5d55165ff08da878fbda71dee83cf diff --git a/src/AST/function.h b/src/AST/function.h index 65a4b29..3f2a1a9 100644 --- a/src/AST/function.h +++ b/src/AST/function.h @@ -5,11 +5,27 @@ #include "ops.h" #include "structs.h" -struct Function { - ArithOp op; - VectorSet* domains; - Set * range; - OverFlowBehavior overflowbehavior; - Table* table; +#define GETFUNCTIONTYPE(o) (((Function*)o)->type) + +struct Function{ + FunctionType type; +}; + +struct FunctionOperator { + Function base; + ArithOp op; + VectorSet* domains; + Set * range; + OverFlowBehavior overflowbehavior; }; + +struct FunctionTable{ + Function base; + Table* table; +}; + +Function* allocFunctionOperator( ArithOp op, Set ** domain, uint numDomain, Set * range,OverFlowBehavior overflowbehavior); +Function* allocFunctionTable (Table* table); +void deleteFunction(Function* This); + #endif