[gcjx] Expand visitor interface
Ranjit Mathew
rmathew@gmail.com
Wed Oct 12 21:21:00 GMT 2005
On 12 Oct 2005 12:23:29 -0600, Tom Tromey <tromey@redhat.com> wrote:
>
> 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.
OK, I'll submit a follow-up patch to bring these two under
the visitor umbrella as well.
Now if only I can come up with a simple way of tackling
model_generic_invocation instances...
> 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.
We can always refactor these interfaces later if they
seem ugly. I am just putting in stuff that lets me achieve
what I want with the minimum disruption to the rest of the
code.
> Ranjit> OK?
>
> Yes, thanks.
I have applied the patches.
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
More information about the Java-patches
mailing list