Á°¤ÎÆü / ¼¡¤ÎÆü / ºÇ¿· / 2003-05

¤¿¤Þ¤Ë¤Ã¤­¡£ / 2003-05-13

2003-05
Æü·î²Ð¿åÌÚ¶âÅÚ
123
45678910
11121314151617
18192021222324
25262728293031

2003-05-13 Tue

¢£ ¥Ð¥¤¥È¥³¡¼¥É¤«¤é¡¥

ÇÛÎó¤Î̾¾Î¤Ã¤Æ¤É¤¦¤ä¤Ã¤Æ¼è¤ë¤ó¤À¤í¡¥aaload ¤È¤«¡¤iaload ¤Ê¤É¤«¤é¤Ç¤Ï¥í¡¼¥«¥ëÊÑ¿ô̾¤Ï¼è¤ì¤Ê¤¤¡¥startPC ¤«¤éȽÃǤ·¤è¤¦¤È¤·¤Æ¤â

int[] x, y;
y = { 0, 1, };
x = { 1, 0, };


¤Ê¤ó¤Æ¤ä¤é¤ì¤ë¤È¡¤¤É¤Ã¤Á¤«¤ï¤«¤é¤ó¡¥

»ÅÊý¤Ê¤¤¤Î¤Ç¡¤[aidflb]aload ¤ä [aidflb]astore ¤Î¸å¤ò½çÈÖ¤ËÄ´¤Ù¤Æ¤¤¤Ã¤Æ¡¤astore, putfield ¤µ¤ì¤Æ¤¤¤ëÊÑ¿ô̾¤ÇÄ´¤Ù¤ë¤³¤È¤Ë¤¹¤ë¡¥

¤¢¡¼¡¥¥Û¥ó¥È¤Ë¥Ð¥¤¥È¥³¡¼¥É¤¬ÉáÄÌ¤ËÆÉ¤á¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤­¤¿¤è¡¦¡¦¡¦¡¥

Category: [Java]

¢£ 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 ¤µ¤ì¤ë¤Î¤Ç¤½¤¦¤·¤Æ¤¤¤ë¡¥

Category: [BCEL]

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

Á°¤ÎÆü / ¼¡¤ÎÆü / ºÇ¿· / 2003-05

¥«¥Æ¥´¥ê