Talk:List of Java bytecode instructions
![]() | Computing Unassessed | |||||||||
|
This was originally in the java bytecode article, but got deleted there. Since there was some support to keep the list, and since there are similar listings for x86, it seems appropriate to have this article. This was basically copied from an older revision of the before mentioned article.
Updates
I just noticed this article and have made some changes to it to make it feel more consistent with other related Java Platform-articles. There is now a short introduction (as requested) and the template that is used by other Java-articles has been added to the bottom of the page. I may also suggest moving this article to another name like "List of Java bytecode instructions". It feels more propriate somehow.
Similarly, I have added a List of CIL instructions.
Robert Sundström (talk) 02:00, 13 February 2010 (UTC)
Sortable Table
I converted it into a sortable table to make it possible to see the instructions sorted by instruction code and by number of extra bytes. It works but is not perfect and I didn't find out how to get the following problems solved even though I tried a few things mentioned in Help:Sorting:
- The hex numbers should always be sorted as ASCII not numerical. Currently one needs to press the sort button 3 times to get a reasonable sorting of the hexadecimal values.
- I added the number of extra bytes at the beginning of all text in this row so that sorting makes sense. But I think it would be better if 3: were treated as less than 3/5: and 4: less than 4+:
Apart from that I'm not sure if the stack before/after column should better be split in two seperate columns that are independently sortable? --X4u (talk) 20:54, 18 May 2011 (UTC)
Hello world's bytecode
What does the bytecode for a hello-world app look like? 68.173.113.106 (talk) 23:34, 5 February 2012 (UTC)
- You can write small java application and use the java disassembler, javap (this page also has some examples of bytecode).
JVM bytecode updates
Are there any updates to bytecode in Java 1 .. Java 8 ? `a5b (talk) 03:28, 26 April 2013 (UTC)
- Most changes of the past affected the class file format rather than the byte code instructions. IIRC, the first change came with Java 5 that
ldc
andldc_w
may loadClass
constants from the pool. With Java 7,ldc
andldc_w
may loadMethodType
andMethodHandle
constants as well, and theinvokedynamic
instruction was added whilejsr
,jsr_w
, andret
were removed. 77.12.173.11 (talk) 15:55, 16 April 2014 (UTC)
Java Card Bytecodes
I have found the subset of Java Card bytecodes BUT I haven't confirmed what bytecodes $FE & $FF do nor confirmed that the same bytecodes are used. Can someone help check this one? I have looked long and hard but it seems to be yet another case of obstification as security.
aaload aastore aconst_null aload anewarry areturn arraylength astore athrow baload bastore bipush checkcast dup dup_x1 dup_x2 dup2 dub2_x1 dup2_x1 getfield getstatic goto if_acmpeq if_acmpne if_icmpeq if_icmpge if_icmple if_icm_pne ifeq ifge ifgt ifle iflt ifne ifnotnull ifnull iinc iload instanceof invokedinterface invokedspecial invokedstatic invokedvirtual ior irem ireturn ishl ishr istore isub iushr ixor jsr iconst_0 iconst_1 ldc ldc_w iload lookupswitch new newarray nop pop pop2 putfield putstatic ret saload sastore sipush swap tableswitch wide