Found bug... Don't update parent's list until we know we aren't going to be freed
[satune.git] / src / AST / element.h
index c3a3ed9fe2bd764207756b8fdfbc755cd1dfd0cc..544725624c4d4ab3ef6426fd4cc8fba070a756d0 100644 (file)
@@ -15,7 +15,8 @@ public:
        Vector<ASTNode *> parents;
        ElementEncoding encoding;
        virtual Element *clone(CSolver *solver, CloneMap *map) {ASSERT(0); return NULL;};
-
+       virtual void updateParents() {}
+       
        CMEMALLOC;
 };
 
@@ -44,6 +45,7 @@ public:
        BooleanEdge overflowstatus;
        FunctionEncoding functionencoding;
        Element *clone(CSolver *solver, CloneMap *map);
+       void updateParents();
        CMEMALLOC;
 };