I’d like to streamline my asm code.
So far, I’m working with bytecode outline in Eclipse to learn how to write my code. As I only see bytecode with debug information, I don’t really know which stuff I can safely leave out and I’d prefer a quick answer by someone knowledgable to testing every possible case myself.
Are these assumptions true?
- I can mix different styles, even in the same class or method (injection of code without debug information into a method with debug information)
visitLabelis only needed as a target for jump-instructions and not around every instructionvisitLineNumbercan be left out (debug information)visitLocalVariablecan be left out (debug information)
Thanks!
You can compile code without debug information to look at it in the Bytecode Outline View, e.g. use separate project in Eclipse for that.
Now to answer your questions: