[問題] java byte code問題

作者: kdok123 (小天)   2014-12-28 22:53:35
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
連結為java bytecode instruction listings
有個三個疑問想問:
getstatic :
get a static field value of a class, where the field is identified by field
reference in the constant pool index (index1 << 8 + index2)
後面括號index1 << 8 + index2 是什麼意思?
invokespecial :
invoke instance method on object objectref, where the method is identified by
method reference index in constant pool (indexbyte1 << 8 + indexbyte2)
這邊的objectref 是什麼意思?
每次只要new的時候都會有這行,是什麼原因?(跟instance method的關係?)
invokevirtual:
invoke virtual method on object objectref, where the method is identified by
method reference index in constant pool (indexbyte1 << 8 + indexbyte2)
每次call method的時候也會產生這行,連自定義的method也是(自定義的method跟
virtual method有什麼關係?)
請教大家了

Links booklink

Contact Us: admin [ a t ] ucptt.com