From 336648e6c68fb0d24d12e67e37c9398c01d09c34 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 14 Oct 2009 00:43:14 +0000 Subject: Remove cruft. git-svn-id: http://svn.drobilla.net/resp/tuplr@216 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/tuplr.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/tuplr.hpp') diff --git a/src/tuplr.hpp b/src/tuplr.hpp index ada5412..f51db5e 100644 --- a/src/tuplr.hpp +++ b/src/tuplr.hpp @@ -107,18 +107,15 @@ typedef void* CFunc; ///< Compiled function (opaque) ***************************************************************************/ struct Object; +struct AType; /// Garbage collector struct GC { - enum Tag { - TAG_AST = 1, ///< Abstract syntax tree node - TAG_FRAME = 2 ///< Stack frame - }; typedef std::list Roots; typedef std::list Heap; GC(size_t pool_size); ~GC(); - void* alloc(size_t size, Tag tag); + void* alloc(size_t size); void collect(const Roots& roots); void addRoot(const Object* obj) { assert(obj); _roots.push_back(obj); } void lock() { _roots.insert(_roots.end(), _heap.begin(), _heap.end()); } @@ -133,7 +130,6 @@ private: struct Object { struct Header { uint8_t mark; - uint8_t tag; }; /// Always allocated with pool.alloc, so this - sizeof(Header) is a valid Header*. @@ -141,9 +137,8 @@ struct Object { inline bool marked() const { return header()->mark != 0; } inline void mark(bool b) const { header()->mark = 1; } - inline GC::Tag tag() const { return (GC::Tag)header()->tag; } - static void* operator new(size_t size) { return pool.alloc(size, GC::TAG_AST); } + static void* operator new(size_t size) { return pool.alloc(size); } static void operator delete(void* ptr) {} static GC pool; }; -- cgit v1.2.1