This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Extending gcjx visitor pattern
On 06 Dec 2005 13:41:36 -0700, Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Mike" == Mike Emmel <mike.emmel@gmail.com> writes:
>
> Mike> I was wondering what people would think about extending the gcjx
> Mike> visitor to also forward user data.
>
> Mike> visit_method (model_method * method,
> Mike> const list<ref_variable_decl> & params,
> Mike> const ref_block &block, void * visitorData );
>
> The reason I didn't do this is type safety. I didn't want to add
> casts all over to handle the user data.
>
> Mike> On a similar note it would also be nice to annotate the gcjx tree with
> Mike> some of my data. There is the aot class but it so far does not seem to
> Mike> be the right answer.
>
> I just use a std::map or the like for this kind of thing. It is less
> handy in some ways but has other advantages -- it is type safe and it
> lets each back end maintain its own state.
>
> Tom
>
Your probably right it does not seem that bad just its different.
I'll learn a bit more but I felt it would be nice to comment on a few
things as I saw them then
to later forget.
Mike