Use union in Boolean to save space
[satune.git] / src / AST / boolean.c
index a7ffd259841caa1fb3fc1b68e36e5df1e1bc3761..aaebba7312315e02f07b4068852de98499058459 100644 (file)
@@ -2,17 +2,17 @@
 
 Boolean* allocBoolean(VarType t) {
        Boolean* tmp=(Boolean*) ourmalloc(sizeof (Boolean));
-       tmp->vtype=t;
-       tmp->btype=_BOOLEAN;
+       tmp->btype=BOOLEANVAR;
+       tmp->var.vtype=t;
        return tmp;
 }
 
-Boolean* allocBooleanOrder(Order* order,uint64_t first, uint64_t second) {
+Boolean* allocBooleanOrder(Order* order, uint64_t first, uint64_t second) {
        Boolean* tmp=(Boolean*) ourmalloc(sizeof (Boolean));
-       tmp->btype=_ORDER;
-       tmp->order=order;
-       tmp->first=first;
-       tmp->second=second;
+       tmp->btype=ORDERCONST;
+       tmp->order.order=order;
+       tmp->order.first=first;
+       tmp->order.second=second;
        return tmp;
 }