13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.3 Constant PoolEach item in the constant pool begins with a I byte tag:. <strong>The</strong> table below lists the valid tags and their values.CONSTANT_Fieldref_infoul tag;u2 class index;u2 name_and_type_index;Constant hypeCONSTANT_ClassCONSTANT_FieldrefCONSTANT_MethodrefCONSTANT_InterfaceMethodrefCONSTANT_StringCONSTANT_ IntegerCONSTANT_FloatCONSTANT_LongCONSTANT_DoubleCONSTANT_NameAndTypeCONSTANT_Utf6CONSTANT_UnicodeValue0 (^4••••■tagCONSTANT_Methodref_info (ul tag;u2 class_index;u2 name_and_type_index;CONSTANT_InterfaceMethodref_info (ul tag;u2 class_index;u2 name_and_type_index;the tag will have the value CONSTANT_Fi eldref, CONSTANT_Methodref, orCONSTANT_Inter faceMethodrefEach tag byte is then followed by one or more bytes giving more information about the specific constant.2.3.1 CONSTANT_ClassCONSTANT_Class is used to represent a class or an interlace.tagCONSTANT_Class_info (ul tag:u2 name index;<strong>The</strong> tag will have the value CONSTANT_Classname_indexconstant_poollname_indexl is a CONSTANT_Ut f 8 giving the string name of the class.Because arrays are objects, the opcodes anewarray and mu 1 t i anewar ray can reference array "classes" viaCONSTANT_Class items in the constant pool. In this case, the name of the class is its signature. For example,the class name forisint ( (H I<strong>The</strong> class name forISThread('(Ljava lang Thread;'2.3.2 CONSTANT JFieldref,Methodref,InterfaceMethodref)Fields, methods, and interface methods are represented by similar structures.class. indexconstant_pool (class_index ) will be an entry of type CONSTANTs l ass giving thename of the class or interface containing the field or method.For CONSTANT Fi el dref and CONSTANT_Methodref, the CONSTANT__Class item must bean actual class. For CONSTANT_Inter f aceMethodref, the item must an interface whichpurports to implement the given method.name_and_type_indexconstant_pool name_and_type_index ) will be an entry of typeCONSTANT_NameAndType . This constant pool entry indicates the name and signature of thefield or method.2.3.3 CONSTANT_StringCONSTANT_String is used to represent constant objects of the built-in type String.tagCONSTANT_String_infoul tag;u2 string_index;<strong>The</strong> tag will have the value CONSTANT_St ring•tring_indexcons tant_pool (str I ng_i ndex ) is a CONSTANT_Ut 18 string giving the value to whichthe String object is initialized.2.3.4 CONSTANT_Integer and CONSTANT_FloatCONSTANT_Integer and CONSTANT. Float represent four byte constants.August 22, 1995 lava Virtual Machine Spedllollon 15 16 JAVA VI/III/II Machine Specitl(alton Aug. ,. 22. I995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!