getfield_quick

Fetch field from object

Bytecode

Type Description
u1 getfield_quick opcode = 0xCE (206)
u2 index

Stack ..., objectref => ..., value

Description

The objectref, which must be of type reference, is popped from the operand stack. The value of the one-word field at offset into the class instance referenced by objectref is fetched and pushed onto the operand stack.

Exception

NullPointerException - objectref is null

Notes

The opcode of this instruction was originally getfield, 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 getfield instruction is resolved, the offset for the field it references is generated. That offset replaces the first operand byte of the original getfield instruction. The second operand byte of the getfield is unused by getfield_quick.