Index: src/SymTab/Mangler.h
===================================================================
--- src/SymTab/Mangler.h	(revision e35f30aa1a6d9c1e9ec668432b5671719a8b5882)
+++ src/SymTab/Mangler.h	(revision 41fcd941e552062fa7dae8d4c0be131064ff92bb)
@@ -25,61 +25,13 @@
 
 namespace SymTab {
-	/// Mangles names to a unique C identifier
-	class Mangler : public Visitor {
-	  public:
+	namespace Mangler {
 		/// Mangle syntax tree object; primary interface to clients
-		template< typename SynTreeClass >
-	    static std::string mangle( SynTreeClass *decl, bool mangleOverridable = true, bool typeMode = false, bool mangleGenericParams = true );
+		std::string mangle( BaseSyntaxNode * decl, bool mangleOverridable = true, bool typeMode = false, bool mangleGenericParams = true );
+
 		/// Mangle a type name; secondary interface
-		static std::string mangleType( Type* ty );
+		std::string mangleType( Type* ty );
 		/// Mangle ignoring generic type parameters
-		static std::string mangleConcrete( Type* ty );
-
-
-		virtual void visit( ObjectDecl *declaration );
-		virtual void visit( FunctionDecl *declaration );
-		virtual void visit( TypeDecl *declaration );
-
-		virtual void visit( VoidType *voidType );
-		virtual void visit( BasicType *basicType );
-		virtual void visit( PointerType *pointerType );
-		virtual void visit( ArrayType *arrayType );
-		virtual void visit( ReferenceType *refType );
-		virtual void visit( FunctionType *functionType );
-		virtual void visit( StructInstType *aggregateUseType );
-		virtual void visit( UnionInstType *aggregateUseType );
-		virtual void visit( EnumInstType *aggregateUseType );
-		virtual void visit( TypeInstType *aggregateUseType );
-		virtual void visit( TupleType *tupleType );
-		virtual void visit( VarArgsType *varArgsType );
-		virtual void visit( ZeroType *zeroType );
-		virtual void visit( OneType *oneType );
-
-		std::string get_mangleName() { return mangleName.str(); }
-	  private:
-		std::ostringstream mangleName;  ///< Mangled name being constructed
-		typedef std::map< std::string, std::pair< int, int > > VarMapType;
-		VarMapType varNums;             ///< Map of type variables to indices
-		int nextVarNum;                 ///< Next type variable index
-		bool isTopLevel;                ///< Is the Mangler at the top level
-		bool mangleOverridable;         ///< Specially mangle overridable built-in methods
-		bool typeMode;                  ///< Produce a unique mangled name for a type
-		bool mangleGenericParams;       ///< Include generic parameters in name mangling if true
-
-		Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams );
-		Mangler( const Mangler & );
-
-		void mangleDecl( DeclarationWithType *declaration );
-		void mangleRef( ReferenceToType *refType, std::string prefix );
-
-		void printQualifiers( Type *type );
-	}; // Mangler
-
-	template< typename SynTreeClass >
-	std::string Mangler::mangle( SynTreeClass *decl, bool mangleOverridable, bool typeMode, bool mangleGenericParams ) {
-		Mangler mangler( mangleOverridable, typeMode, mangleGenericParams );
-		maybeAccept( decl, mangler );
-		return mangler.get_mangleName();
-	}
+		std::string mangleConcrete( Type* ty );
+	} // Mangler
 } // SymTab
 
