Re: Re: writing two different bytecode parts at the same time
Jochen Theodorou <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Eugene Kuleshov wrote: > > If I understand you correctly, right now, the closest would be to use > several MethodNode instances from the tree package (those implement > MethodVisitor interface) and then use InsnLists from those instances to > assemble them together and call insnList.accept(methodVisitor) after > that to get the result. the code is not 100% independent, I will have jumps from one part to the other... is it still possible then? If yes, that would be fabulous. > On the other hand I recall this is a common scenario for compilers > (Janino and Kawa bytecode libs both have support for that). So we > probably should add a new MethodWriter API to provide a more lightweight > support, e.g. allow work with ByteVector trough MethodVisitor API. > Perhaps add a method into the MethodWriter class like MethodVisitor > branch(); which could record the current position and then would insert > bytecodes emitted trough returned MethodVisitor right into that saved > position. that sounds good too bye Jochen -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws