Return double
from method
Bytecode
Type | Description |
u1 | dreturn opcode = 0xAF (175) |
Stack ..., value.word1, value.word2 => [empty]
Description
dreturn pops the two-word double off the stack and pushes it onto the operand
stack of the invoker (i.e. the method which used invokevirtual, invokespecial,
invokestatic or invokeinterface to call the currently executing method).
All other items on the current method's operand stack are discarded. If the current method
is marked as synchronized, then an implicit monitorexit instruction is executed. Then the
current method's frame is discarded, the invoker's frame is reinstated, and control
returns to the invoker. This instruction can only be used in methods whose return type is
double.
The returning method must have return type double
. The
value must be of type double
. The value is popped from the
operand stack of the current frame 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 returns control to the invoker of the method, reinstating the frame of the invoker.