A
Albretch
which official documentation I can't find posted by Sun anywhere:
Say you have this (real) output from a class
. . .
0: aload_0
1: arraylength
2: iconst_1
3: if_icmpge 18
6: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
9: ldc #3; //String input file missing!
. . .
This is how I think things work:
1._ the first number is the offset in the operand stack
2._ then comes the opcode's mnemonic
3._ then depending on the instruction comes a reference, which
3.1_ when prefixed by '#' represents the line number in the methods code section
3.2_ otherwise the valid offset of the operand stack processing should continue
Also I found what apparently looks like new mnemonics/opcodes, e.g.; "invokespecial"
I knew of the following
{"invokevirtual","182"},
{"invokenonvirtual","183"},
{"invokestatic","184"},
{"invokeinterface","185"},
what is the opcode for "invokespecial"?
Where can you find 'the' table mapping opcode's - mnemonic?
Say you have this (real) output from a class
. . .
0: aload_0
1: arraylength
2: iconst_1
3: if_icmpge 18
6: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
9: ldc #3; //String input file missing!
. . .
This is how I think things work:
1._ the first number is the offset in the operand stack
2._ then comes the opcode's mnemonic
3._ then depending on the instruction comes a reference, which
3.1_ when prefixed by '#' represents the line number in the methods code section
3.2_ otherwise the valid offset of the operand stack processing should continue
Also I found what apparently looks like new mnemonics/opcodes, e.g.; "invokespecial"
I knew of the following
{"invokevirtual","182"},
{"invokenonvirtual","183"},
{"invokestatic","184"},
{"invokeinterface","185"},
what is the opcode for "invokespecial"?
Where can you find 'the' table mapping opcode's - mnemonic?