This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: document two functions


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)
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]