This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extending gcjx visitor pattern


I was wondering what people would think about extending the gcjx
visitor to also forward
user data.

I.e visit_method (model_method * method,
                const list<ref_variable_decl> & params,
                const ref_block &block)

would becomes

visit_method (model_method * method,
                const list<ref_variable_decl> & params,
                const ref_block &block, void * visitorData );

Not sure if void * is right but  if the visitor can pass some current
data through on the stack it makes the code cleaner and gets rid of a
lot of local state that needs to be allocated on the heap and tracked.

On a similar note it would also be nice to annotate the gcjx tree with
some of my data. There is the aot class but it so far does not seem to
be the right answer.

Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]