libgcj performance: _Jv_LookupInterfaceMethod

Tom Tromey tromey@cygnus.com
Fri Nov 5 09:53:00 GMT 1999


Jeff> oops... sorry.  Can you point me to any docs on the Cygnus
Jeff> coding style?  I tend to use tabstop=4 and follow Sun's style
Jeff> guide for Java, which affects the way I format C++ too...

Unfortunately here is the only stuff on our web page:

  <p>Note that the GNU Coding Standards do not actually cover Java
  programming style.  libgcj largely uses the obvious extrapolation
  from the GNU C style, but there are some differences.  These aren't
  yet written down, but we'll make them available shortly.


You can read about the GNU style here:

  http://www.gnu.ai.mit.edu/prep/standards_toc.html


Our two differences (or reinterpretations, depending on your POV) from
the GNU style are:

1. Opening brace for a method comes just below the method name, like so:

   public static void foo ()
   {
   }

2. No space before open paren on method invocation.
   There is some dispute what this really means (at least, I think
   there is).  I tend to write:

   foo (args);
   object.bar(args);


Note the rules aren't consistently followed.  Rule #1 was broken a lot
because Emacs didn't used to do that, and I just blindly followed
Emacs for a while.  We never reindented all the code I wrote the
"wrong" way.  Also, big chunks of the interpreter miss various style
points.  Someday we might clean this up.  In any case, new code should
follow the rules.

The standards also talk about how to write a ChangeLog entry.  I
haven't been very pedantic about that.  Most people seem to do an ok
job already.

T


More information about the Java mailing list