Contents | Prev | Next | Index | The JavaTM Virtual Machine Specification |
short
from arraysaload |
Stack ..., arrayref, index ..., value
Description
The arrayref must be of type reference
and must refer to an array whose components are of type short
. The index must be of type int
. Both arrayref and index are popped from the operand stack. The short
value in the component of the array at index is retrieved, sign-extended to an int
value, and pushed onto the top of the operand stack.
Runtime Exceptions
If arrayref is null
, saload throws a NullPointerException
.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the saload instruction throws an ArrayIndexOutOfBoundsException
.
sastore |
short
arrayStack ..., array, index, value ...
Description
The arrayref must be of type reference
and must refer to an array whose components are of type short
. Both index and value must be of type int
. The arrayref, index, and value are popped from the operand stack. The int
value is truncated to a short
and stored as the component of the array indexed by index.
Runtime Exceptions
If arrayref is null
, sastore throws a NullPointerException
.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the sastore instruction throws an ArrayIndexOutOfBoundsException
.
short
sipush | |
byte1 | |
byte2 |
Description
The immediate unsigned byte1 and byte2 values are assembled into an intermediate short
where the value of the short is (byte1 << 8) | byte2. The intermediate value is then sign-extended to an int
, and the resulting value is pushed onto the operand stack.
swap |
Stack ..., word2, word1 ..., word1, word2
Description The top two words on the operand stack are swapped.
The swap instruction must not be used unless each of word2 and word1 is a word that contains a 32-bit data type.
Notes Except for restrictions preserving the integrity of 64-bit data types, the swap instruction operates on untyped words, ignoring the types of the data they contain.
Contents | Prev | Next | Index
Java Virtual Machine Specification
Copyright © 1996, 1997 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to jvm@java.sun.com