From daf53bb2708982a2bcc6d6cc08fe88790ccf0bc2 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 21 May 2020 15:36:02 -0400 Subject: Non virtual accept implementation on AST types (#1351) * First pass impl of making accept on AST node types non virtual. * A single switch for ITypeVistor on Val type. * Use ORIGIN to choose ITypeVisitor dispatch. * Don't use ORIGIN - we don't need special handling for ITypeVisitor on Val derived types. --- source/slang/slang-syntax.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'source/slang/slang-syntax.cpp') diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp index cb75622bc..486466718 100644 --- a/source/slang/slang-syntax.cpp +++ b/source/slang/slang-syntax.cpp @@ -9,11 +9,6 @@ namespace Slang { -#define SLANG_CLASS_ACCEPT_IMPL(NAME, SUPER, ORIGIN, LAST, MARKER, TYPE, param) \ - void NAME::accept(NAME::Visitor* visitor, void* extra) { visitor->dispatch_##NAME(this, extra); } - -SLANG_ALL_ASTNode_NodeBase(SLANG_CLASS_ONLY, SLANG_CLASS_ACCEPT_IMPL) - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!! DiagnosticSink impls !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! void printDiagnosticArg(StringBuilder& sb, Decl* decl) @@ -209,13 +204,6 @@ Index getFilterCountImpl(const ReflectClassInfo& clsInfo, MemberFilterStyle filt return count; } - // Type - - void Type::accept(IValVisitor* visitor, void* extra) - { - accept((ITypeVisitor*)visitor, extra); - } - // TypeExp bool TypeExp::Equals(Type* other) -- cgit v1.2.3