Forced remapping of local variables
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi all, is it possible to "search-and-replace" the usage of a given local variable through another (unoccupied) local variable throughout a method, using ASM? For example, assume that the local variable with index 1 holds an integer, and I want to store that integer in local variable 555 (assuming that 555 is unoccupied while also some local vars between 1 and 55 are unoccupied). Of course, the parameters of ILOAD / ISTORE / IINC instructions need to be adapted as well. Additionally, the WIDE instruction may need to be used, depending on the localvar index. Is there an automated, "easy" way to do that using ASM? I tried to manually replace localvar indexes inside ASMifier-generated code, but learned that the dumped bytecode still groups localvars closer to the "bottom", ignoring my instructions... Any help will be appreciated :-) Many thanks, Michael Kuperberg
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