This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: document two functions
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 19 Dec 2005 13:05:25 -0700
- Subject: [gcjx] Patch: FYI: document two functions
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This documents a couple of bytecode helper methods.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/byteutil.hh (zero_if_opcode): Commented.
(invert_if_opcode): Likewise.
Index: bytecode/byteutil.hh
===================================================================
--- bytecode/byteutil.hh (revision 107604)
+++ bytecode/byteutil.hh (working copy)
@@ -22,12 +22,17 @@
#ifndef GCJX_BYTECODE_BYTEUTIL_HH
#define GCJX_BYTECODE_BYTEUTIL_HH
+/// For a given integer comparison opcode, this will return the
+/// corresponding opcode that compares against zero. For instance,
+/// for op_if_icmpge, this will return op_ifge.
inline java_opcode
zero_if_opcode (java_opcode base)
{
return java_opcode (op_ifeq + base - op_if_icmpeq);
}
+/// Invert a comparison opcode. For instance, given op_if_cmpge, this
+/// will return op_if_cmplt.
inline java_opcode
invert_if_opcode (java_opcode base)
{