compting of frame stack content
"luc peuvrier at home" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <01E3620EFB414051BA16D480F3CC3B09@peuvrierluc> |
I replace the RETURN opcode of the methods by a GOTO "endLabel"
So in visitMaxs implementation method I have to generate the code as below:
methodVisitor.visitLabel(label2);
methodVisitor.visitFrame(F_SAME, 0, null, 1, new Object[]{XXX} );
methodVisitor.visitMethodInsn(
/**/INVOKESTATIC, JOAFIP_CALL_BACK,
/**/"methodEnd$JOAFIP$", LJAVA_LANG_OBJECT_V_DESC);
methodVisitor.visitInsn(returnOpcode);
my problem is how compute XXX according to the return type, since the value to return is in stack after the jump.
I know the return type using "Type returnType = Type.getReturnType(desc);" where desc is the method descriptor.
Regards
Luc
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