Java Virtual Machine (Java Series)
return
return Stack
Before | After |
| ... | ... |
return is used to return from a method whose return type is void.
All 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.
Example
; the following method takes no parameters, performs no actions, and returns no results. .method identity()V return ; simply return with no result .end method Bytecode
Type | Description |
| u1 | return opcode = 0xB1 (177) |
lreturn, freturn, dreturn, areturn, ireturn
prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates
Категории