putfield = 181 |
indexbyte1 |
indexbyte2 |
Stack: ..., objectref, value => ...OR
Stack: ..., objectref, valueindexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class. The constant pool item will be a field reference to a class name and a field name. The item is resolved to a field block pointer which has both the field width (in bytes) and the field offset (in bytes).-word1
, value-word2
=> ...
The field at that offset from the start of the object referenced by objectref will be set to the value on the top of the stack.
This instruction deals with both 32-bit and 64-bit wide fields.
If objectref is null
, a NullPointerException
is generated.
If the specified field is a static field, an IncompatibleClassChangeError
is thrown.
getfield = 180 |
indexbyte1 |
indexbyte2 |
Stack: ..., objectref => ..., valueOR
Stack: ..., objectref => ..., valueindexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class. The constant pool item will be a field reference to a class name and a field name. The item is resolved to a field block pointer which has both the field width (in bytes) and the field offset (in bytes).-word1
, value-word2
objectref must be a reference to an object. The value at offset into the object referenced by objectref replaces objectref on the top of the stack.
This instruction deals with both 32-bit and 64-bit wide fields.
If objectref is null
, a NullPointerException
is generated.
If the specified field is a static field, an IncompatibleClassChangeError
is thrown.
putstatic = 179 |
indexbyte1 |
indexbyte2 |
Stack: ..., value => ...OR
Stack: ..., valueindexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class. The constant pool item will be a field reference to a static field of a class. That field will be set to have the value on the top of the stack.-word1
, value-word2
=> ...
This instruction works for both 32-bit and 64-bit wide fields.
If the specified field is a dynamic field, an IncompatibleClassChangeError
is thrown.
getstatic = 178 |
indexbyte1 |
indexbyte2 |
Stack: ..., => ..., valueOR
Stack: ..., => ..., valueindexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class. The constant pool item will be a field reference to a static field of a class.-word1
, value-word2
This instruction deals with both 32-bit and 64-bit wide fields.
If the specified field is a dynamic field, an IncompatibleClassChangeError
is generated.