There are currently three classes that inherit from BuiltinsWriterVisitor:
CodeWriterVisitor
FactoryMethodsWriterVisitor
ToStringMethodsWriterVisitor
We're planning on adding two more:
DebugViewWriterVisitor
DynamicLinqWriterVisitor
Of all of these, only CodeWriterVisitor provides implementations for the dynamic submethods: WriteBinaryOperationBinder, WriteConvertBinder etc. All the others handle everything in VisitDynamic.
We could move these from abstract to virtual methods in BuiltinsWriterVisitor, throwing a NotImplementedException in the default implementation.
Alternatively, we could move these abstract methods out to CodeWriterVisitor, where they could be changed to non-overridable.
There are currently three classes that inherit from BuiltinsWriterVisitor:
We're planning on adding two more:
Of all of these, only CodeWriterVisitor provides implementations for the dynamic submethods: WriteBinaryOperationBinder, WriteConvertBinder etc. All the others handle everything in VisitDynamic.
We could move these from
abstract
tovirtual
methods in BuiltinsWriterVisitor, throwing a NotImplementedException in the default implementation.Alternatively, we could move these
abstract
methods out to CodeWriterVisitor, where they could be changed to non-overridable.