Fix warnings, merge, and check my code in
[satune.git] / src / AST / function.h
1 #ifndef FUNCTION_H
2 #define FUNCTION_H
3 #include "classlist.h"
4 #include "mymemory.h"
5 #include "ops.h"
6 #include "structs.h"
7
8 #define GETFUNCTIONTYPE(o) (((Function*)o)->type)
9
10 struct Function{
11     FunctionType type;
12 };
13
14 struct FunctionOperator {
15     Function base;
16     ArithOp op;
17     VectorSet* domains;
18     Set * range;
19     OverFlowBehavior overflowbehavior;
20 };
21
22 struct FunctionTable{
23     Function base;
24     Table* table;
25 };
26
27 Function* allocFunctionOperator( ArithOp op, Set ** domain, uint numDomain, Set * range,OverFlowBehavior overflowbehavior);
28 Function* allocFunctionTable (Table* table);
29 void deleteFunction(Function* This);
30
31 #endif