areturn


Operation Return reference from method

areturn


Forms areturn = 176 (0xb0)

Stack ..., objectref

[empty]

Description The objectref must be of type reference and must refer to an object of a type that is assignment compatible (§2.6.6) with the type represented by the return descriptor (§4.3.3) of the returning method. The objectref is popped from the operand stack of the current frame (§3.6) and pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded. If the returning method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction.

The interpreter then reinstates the frame of the invoker and returns control to the invoker.