diff options
author | David Robillard <d@drobilla.net> | 2010-12-03 03:08:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-03 03:08:08 +0000 |
commit | ad056bdf71c8bf780e22f983c83fac0e3a2f41f3 (patch) | |
tree | 0d70ea6eb4188f40034e8e011adc5be6e0956fc7 /src/gc.cpp | |
parent | 074edbce57e850fc3293eef47861e0ed7707c7e9 (diff) | |
download | resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.tar.gz resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.tar.bz2 resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.zip |
Remove use of RTTI for AST.
git-svn-id: http://svn.drobilla.net/resp/resp@290 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/gc.cpp')
-rw-r--r-- | src/gc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -57,7 +57,7 @@ mark(const Object* obj) obj->mark(true); if (obj->tag() != T_UNKNOWN) { - const ATuple* tup = ((const AST*)obj)->to<const ATuple*>(); + const ATuple* tup = ((const AST*)obj)->to_tuple(); if (tup) FOREACHP(ATuple::const_iterator, i, tup) mark(*i); @@ -80,8 +80,9 @@ GC::collect(const Roots& roots) (*i)->mark(false); assert(!(*i)->marked()); } else { - if ((*i)->tag() != T_UNKNOWN) - ((AST*)*i)->~AST(); + const Tag tag = (*i)->tag(); + if (tag == T_TUPLE || tag == T_TYPE) + free(((ATuple*)*i)->_vec); tlsf_free((tlsf_t*)_pool, ((char*)(*i) - sizeof(Object::Header))); _heap.erase(i); |