sastore : store in short array : index : visitInsn()

Description
Takes an int from the stack, truncates it to a signed 16-bit short, and stores it in an array of shorts. arrayref is a reference to an array of 16-bit signed shorts. index is an int. value is the int to be stored in the array. arrayref, index and value are removed from the stack, and value is stored in the array at the given index.
Exceptions
ArrayIndexOutOfBoundsException - index is < 0 or >= arrayref.length

NullPointerException - arrayref is null
Notes
Array indices start at 0 (the first entry in the array is at index 0).
See also
iastore lastore fastore dastore aastore bastore castore iaload laload faload daload aaload baload caload saload
Stack
Before After
value ...
index ...
arrayref ...
... ...
Bytecode
Type Description
u1 sastore opcode = 0x56 (86)