Second that. Any methods that are synthetic in nature shouldn't really get line number tables. Seems like it can only confuse, never help.
I usually trim out the needless Labels that get generated, as well as the local variable information. The extra labels don't hurt anything (just take up space in the source). Now that I think about though, leaving in locals might be useful actually (and might mean some of the Labels might need to remain). > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:tc-dev- > [EMAIL PROTECTED] On Behalf Of Alex Miller > Sent: Tuesday, October 02, 2007 9:31 AM > To: [email protected] > Subject: Re: [tc-dev] Line numbers in generated code? > > I've been removing the line number instructions from code generated by > the bytecode plugin when I move it into our code. I think it's a good > idea as those numbers are not meaningful and actually confusing for > debuggers, etc as you say. > > ----- Original Message ----- > From: "Geert Bevin" <[EMAIL PROTECTED]> > To: [email protected] > Sent: Tuesday, October 2, 2007 11:10:10 AM (GMT-0600) America/Chicago > Subject: [tc-dev] Line numbers in generated code? > > Hi everyone, > > while reading through the code for the ConcurrentHashMap support I > ran into a lot of code that seems to be straight copy-pastes of Java > code that was converted to ASM using the Eclipse plugin. For > instance, look at JavaUtilConcurrentHashMapAdapter and for instance > the method createWrapperMethod(). This is an instrumentation that is > using to create a wrapper method around existing methods, yet it uses > line numbers. This means that the same line numbers are present in > the byte code at different locations and for different method names. > Almost all the other generated methods in this class to the same thing. > > I think it's a good practice to remove the line numbers of generated > byte code since I think that this could result into maybe unwanted > behavior with debuggers / profilers / etc. > > What do you think? Should I removed the line numbers that are in > those classes now? > > Geert > > -- > Geert Bevin > Terracotta - http://www.terracotta.org > Uwyn "Use what you need" - http://uwyn.com > RIFE Java application framework - http://rifers.org > Music and words - http://gbevin.com > > _______________________________________________ > tc-dev mailing list > [email protected] > http://lists.terracotta.org/mailman/listinfo/tc-dev > > _______________________________________________ > tc-dev mailing list > [email protected] > http://lists.terracotta.org/mailman/listinfo/tc-dev
_______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
