Start expression simplification

This commit is contained in:
Léa Saviot
2018-06-29 17:54:54 +02:00
parent 53bacec72f
commit f0e2bd0e5c
12 changed files with 147 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
#include "tree_node.h"
#include "tree_pool.h"
#include "expression_node.h"
#include "tree_reference.h"
#include <stdio.h>
// Node operations
@@ -175,3 +175,9 @@ bool TreeNode::hasSibling(const TreeNode * e) const {
}
return false;
}
void TreeNode::replaceWithAllocationFailure() {
TreeRef t(this);
t.replaceWithAllocationFailure();
// TODO: OK to change the memory while executing from it, even though we know it will stop execution just after ?
}