Re: Frames computation with ClassWriter.getCommonSuperClass()

Eric Bruneton <[email protected]> Tue, 10 Jan 2012 20:33:37 +0100
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
09/01/2012 18:34, Clement Escoffier wrote:
> Is there any way to avoid the call to getCommonSuperClass, or is
> there anyway to turn around the class dependency ?

if your transformation is not too complex, you can probably avoid using 
the ClassWriter COMPUTE_FRAMES option, and instead update the stack map 
frames yourself, in your method adapter (see for instance 
LocalVariablesSorter). Such incremental updates are also much more 
efficient than recomputing the frames from scratch. For simple 
tranformations that do not add branch instructions, you generally don't 
even need to update the stack map frames (see the ASM 4.0 user guide p. 51).

Eric
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