[gcjx] Expand visitor interface
Tom Tromey
tromey@redhat.com
Wed Oct 12 18:29:00 GMT 2005
>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:
Ranjit> My maniacal obsession with the visitor interface and the
Ranjit> pretty-printer continues. This patch seeks to bring as many
Ranjit> of the remaining model classes as possible under the visitor.
Thanks.
Ranjit> 3. Classes like model_annotation and
Ranjit> model_annotation_initializer that just abort() in their
Ranjit> visit() implementations.
This was just an error-catching move on my part; some of these inhabit
an odd place where they are derived classes for implementation
convenience, but visiting them in a traditional code generation sense
would be a mistake. With the enlarged visitor approach, removing
these abort()s makes sense.
Ranjit> This is also the reason for some of the quirky parameters
Ranjit> for some of the visit_xxx methods and why I had to
Ranjit> make model_block::statements, etc. protected instead of
Ranjit> private.
Interesting; now I've learned more about why inheritance is sucky.
Or something.
Ranjit> OK?
Yes, thanks.
Tom
More information about the Java-patches
mailing list