[patch] documentation fix for RET instruction

"Ed Price" <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <000301c3f974$59d01ec0$6600a8c0@xpc>
the BCEL javadocs for RET instruction (.../generic/RET.java)
describe its effect on the operand stack like this:

  ... -> ..., address

but that is wrong in two ways:

(1) if it affected the stack it would pop the return address off
    the stack, not push it on the stack (JSR does that).

(2) it actually doesn't affect the stack at all!

as the JVM spec says:

 "Note that jsr pushes the address onto the operand stack and ret
 gets it out of a local variable. This asymmetry is intentional."

Finally note that the code is correct (eg RET does not implement
StackConsumer or StackProducer).

Anyway here's the patch:

--- jakarta-bcel/src/java/org/apache/bcel/generic/RET.java.~1.2.~
2003-05-23 03:55:17.000000000 -0400
+++ jakarta-bcel/src/java/org/apache/bcel/generic/RET.java	2004-02-22
13:36:32.000000000 -0500
@@ -59,7 +59,7 @@
 /** 
  * RET - Return from subroutine
  *
- * <PRE>Stack: ..., -&gt; ..., address</PRE>
+ * <PRE>Stack: ... -&gt; ...</PRE>
  *
  * @version $Id: RET.java,v 1.2 2003/05/23 07:55:17 mdahm Exp $
  * @author  <A HREF="mailto:[email protected]">M. Dahm</A>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.