i2s


Operation

i2s


Convert int to short

Forms i2s = 147 (0x93)

Stack ..., value ..., result

Description The value on the top of the operand stack must be of type int. It is popped from the operand stack, truncated to a short, then sign-extended to an int result. The result is pushed onto the operand stack.

Notes The i2s instruction performs a narrowing primitive conversion (§2.6.3). It may lose information about the overall magnitude of value. The result may also not have the same sign as value.