diff options
author | glenda <glenda@cirno> | 2022-09-18 19:58:41 +0000 |
---|---|---|
committer | glenda <glenda@cirno> | 2022-09-18 19:58:41 +0000 |
commit | e275bf9ff105bbb3e12fcf15e3ab755ed0cd26cf (patch) | |
tree | 8db2ea862204c026c2fe5670a15deaaeadc88960 /memory.c | |
parent | 269c81f0217999367b4180e6a795142cbb2d02e7 (diff) |
Chain the symbol tables, not the dfn frames
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -167,6 +167,7 @@ void freefunction(Function f) { freearray(f.left); + freesymtab(f.scope); switch(f.type){ case FunctypeDfn: free(f.dfn); @@ -197,6 +198,7 @@ freeoperator(Operator o) { freedatum(o.left); freedatum(o.right); + freesymtab(o.scope); switch(o.type){ case OperatortypeDop: free(o.dop); @@ -226,6 +228,8 @@ dupfunction(Function f) Function g = f; if(g.left) incarrayref(g.left); + if(g.scope) + g.scope->refs++; switch(f.type){ case FunctypeDfn: @@ -259,6 +263,9 @@ Operator dupoperator(Operator o) { Operator p = o; + if(p.scope) + p.scope->refs++; + if(p.left) incdatumref(p.left); if(p.right) |