Set field in object
Bytecode
Type | Description |
u1 | putfield_quick opcode = 0xCF (207) |
u1 | index |
u1 | unused |
Stack ..., objectref, value => ...
Description The objectref, which must be of type reference
,
and value, which must be a value of a type appropriate for the specified field,
are popped from the operand stack. The value is written at offset
into the class instance referenced by objectref.
NullPointerException
- objectref is null
Notes
The opcode of this instruction was originally putfield, operating on a field determined dynamically to have an offset into the class instance data of 255 words or less and to have a width of one word.
When the constant pool entry referenced by a putfield instruction is resolved, the offset for the field it references is generated. That offset replaces the first operand byte of the original putfield instruction. The second operand byte of the putfield is unused in putfield_quick.