¤¿¤Þ¤Ë¤Ã¤¡£ / 2003-05-13
| Æü | ·î | ²Ð | ¿å | ÌÚ | ¶â | ÅÚ |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
2003-05-13 Tue
¢£ ¥Ð¥¤¥È¥³¡¼¥É¤«¤é¡¥
ÇÛÎó¤Î̾¾Î¤Ã¤Æ¤É¤¦¤ä¤Ã¤Æ¼è¤ë¤ó¤À¤í¡¥aaload ¤È¤«¡¤iaload ¤Ê¤É¤«¤é¤Ç¤Ï¥í¡¼¥«¥ëÊÑ¿ô̾¤Ï¼è¤ì¤Ê¤¤¡¥startPC ¤«¤éȽÃǤ·¤è¤¦¤È¤·¤Æ¤â
int[] x, y;
y = { 0, 1, };
x = { 1, 0, };
¤Ê¤ó¤Æ¤ä¤é¤ì¤ë¤È¡¤¤É¤Ã¤Á¤«¤ï¤«¤é¤ó¡¥
»ÅÊý¤Ê¤¤¤Î¤Ç¡¤[aidflb]aload ¤ä [aidflb]astore ¤Î¸å¤ò½çÈÖ¤ËÄ´¤Ù¤Æ¤¤¤Ã¤Æ¡¤astore, putfield ¤µ¤ì¤Æ¤¤¤ëÊÑ¿ô̾¤ÇÄ´¤Ù¤ë¤³¤È¤Ë¤¹¤ë¡¥
¤¢¡¼¡¥¥Û¥ó¥È¤Ë¥Ð¥¤¥È¥³¡¼¥É¤¬ÉáÄÌ¤ËÆÉ¤á¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¿¤è¡¦¡¦¡¦¡¥
¢£ BCEL
¤ª¤©¤Ã¤È¡¤InstructionList ¤«¤é Instruction ¤ÎÇÛÎó¤ò¼è¤Ã¤Æ¡¤Ê̤ΠInstructionList ¤Ë append ¤·¤Æ¤¤¤Ã¤¿¤é¡¤if ¤È¤«¡¤goto ¤Î»þ¤Ë ClassGenException ¤¬È¯À¸¤¹¤ë¡¥
²ò·èºö¡¥
InstructionList ¤«¤é getInstuctionHandles ¤Ç InstructionHandle ¤ÎÇÛÎó¤ò¼èÆÀ¤·¡¤¸µ¤Î InstructionList ¤Ë insert ¤·¤Æ¤¤¤¯¡¥
insert ¤¹¤ë¾ì½ê¤Ï¼èÆÀ¤·¤¿ InstructionHandle ¤Ç·è¤á¤ë¡¥
return ¤ÎÁ°¤Ë¤½¤Î¥á¥½¥Ã¥É¤¬½ª¤ï¤Ã¤¿¤È¤¤¤¦¤³¤È¤òɽ¼¨¤¹¤ë¤Ë¤Ï°Ê²¼¤Î¤è¤¦¤Ê´¶¤¸¤Ç¼ÂÁõ¤¹¤ì¤Ð¤è¤¤¡¥
[/src]
String methodName = methodGen.getMethod().getName();
InstructionList list = methodGen.getInstructionList();
InstructionHandle[] handles = list.getInstructionHandles();
for(int i = 0; i < handles.length; i++){
Instruction i = handles[i].getInstruction();
if(i instanceof ReturnInstruction){
list.append(handls[i].getPrev(),
factory.createPrintln("----- end of " + methodName + " ----- "));
}
}
[/src]
handls[i].getPrev() ¤È¤·¤Ê¤±¤ì¤Ð return ¤Î¸å¤í¤Ë println ʸ¤¬ append ¤µ¤ì¤ë¤Î¤Ç¤½¤¦¤·¤Æ¤¤¤ë¡¥
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12
2003 : 01 02 03 04 05 06 07 08 09 10 11 12
2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2001 : 01 02 03 04 05 06 07 08 09 10 11 12
ºÇ½ª¹¹¿·»þ´Ö: 2008-07-02 15:08





