The Artima Developer Community
Sponsored Link

Java Answers Forum
mnemonics-opcodes map and format of output of the javap utility

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Albretch Mueller

Posts: 1
Nickname: albretch
Registered: Oct, 2004

mnemonics-opcodes map and format of output of the javap utility Posted: Oct 1, 2004 5:50 PM
Reply to this message Reply
Advertisement
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?

Topic: Null Interface Previous Topic   Next Topic Topic: TreeViewer.setInput

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use