This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gcjx] Expand visitor interface
- From: Tom Tromey <tromey at redhat dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 12 Oct 2005 12:23:29 -0600
- Subject: Re: [gcjx] Expand visitor interface
- References: <dijj6g$994$1@sea.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "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