Changed freeing symbol relations, cosmetic changes

git-svn-id: svn://svn.cc65.org/cc65/trunk@2610 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-04 19:02:11 +00:00
parent b34d2df08b
commit 5881a2b4f5
2 changed files with 7 additions and 6 deletions

View File

@@ -111,6 +111,11 @@ static void FreeExprNode (ExprNode* E)
/* Free a node */
{
if (E) {
if (E->Op == EXPR_SYMBOL) {
/* Remove the symbol reference */
SymDelRef (E->V.Sym, E);
}
/* Place the symbol into the free nodes list if possible */
if (FreeNodeCount < MAX_FREE_NODES) {
/* Remember this node for later */
E->Left = FreeExprNodes;
@@ -951,10 +956,6 @@ void FreeExpr (ExprNode* Root)
if (Root) {
FreeExpr (Root->Left);
FreeExpr (Root->Right);
if (Root->Op == EXPR_SYMBOL) {
/* Remove the symbol reference */
SymDelRef (Root->V.Sym, Root);
}
FreeExprNode (Root);
}
}