7 #include "functionencoding.h"
8 #include "elementencoding.h"
11 #define GETELEMENTTYPE(o) (o->type)
12 #define GETELEMENTPARENTS(o) (&((Element *)o)->parents)
13 class Element : public ASTNode {
15 Element(ASTNodeType type);
17 Vector<ASTNode *> parents;
18 ElementEncoding encoding;
22 class ElementConst : public Element {
24 ElementConst(uint64_t value, VarType type);
31 class ElementSet : public Element {
38 class ElementFunction : public Element {
40 ElementFunction(Function *function, Element **array, uint numArrays, Boolean *overflowstatus);
43 Array<Element *> inputs;
44 Boolean *overflowstatus;
45 FunctionEncoding functionencoding;
49 Set *getElementSet(Element *This);
51 static inline ElementEncoding *getElementEncoding(Element *e) {
55 static inline FunctionEncoding *getElementFunctionEncoding(ElementFunction *func) {
56 return &func->functionencoding;