This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[ecj] Patch: FYI: update jcf-dump for 1.5


I'm checking this in on the gcj-eclipse branch.

This updates jcf-dump to properly dump the new 1.5 access bits.

We still don't dump the new attributes, e.g., annotations.  I expect
we'll do annotations as another set of patches somewhat later.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* jcf-dump.c (print_access_flags): Handle varargs, bridge,
	synthetic, enum, annotation.
	* jcf.h (ACC_BRIDGE): New macro.
	(ACC_VARARGS): Likewise.
	(ACC_SYNTHETIC): Likewise.
	(ACC_ENUM): Likewise.
	(ACC_ANNOTATION): Likewise.

Index: jcf.h
===================================================================
--- jcf.h	(revision 114390)
+++ jcf.h	(working copy)
@@ -224,12 +224,17 @@
 #define ACC_FINAL 0x0010
 #define ACC_SYNCHRONIZED 0x0020
 #define ACC_SUPER 0x0020
+#define ACC_BRIDGE 0x0040
 #define ACC_VOLATILE 0x0040
 #define ACC_TRANSIENT 0x0080
+#define ACC_VARARGS 0x0080
 #define ACC_NATIVE 0x0100
 #define ACC_INTERFACE 0x0200
 #define ACC_ABSTRACT 0x0400
 #define ACC_STRICT 0x0800
+#define ACC_SYNTHETIC 0x01000
+#define ACC_ANNOTATION 0x02000
+#define ACC_ENUM 0x04000
 /* "Invisible" refers to Miranda methods inserted into an abstract
    class.  It is also used in the runtime.  */
 #define ACC_INVISIBLE 0x8000
Index: jcf-dump.c
===================================================================
--- jcf-dump.c	(revision 114390)
+++ jcf-dump.c	(working copy)
@@ -395,8 +395,10 @@
   if (flags & ACC_ABSTRACT) fprintf (stream, " abstract");
   if (flags & ACC_STATIC) fprintf (stream, " static");
   if (flags & ACC_FINAL) fprintf (stream, " final");
-  if (flags & ACC_TRANSIENT) fprintf (stream, " transient");
-  if (flags & ACC_VOLATILE) fprintf (stream, " volatile");
+  if (flags & ACC_TRANSIENT)
+    fprintf (stream, context == 'm' ? " varargs" : " transient");
+  if (flags & ACC_VOLATILE)
+    fprintf (stream, context == 'm' ? " bridge" : " volatile");
   if (flags & ACC_NATIVE) fprintf (stream, " native");
   if (flags & ACC_SYNCHRONIZED)
     {
@@ -405,8 +407,11 @@
       else
 	fprintf (stream, " synchronized");
     }
-  if (flags & ACC_INTERFACE) fprintf (stream, " interface");
+  if (flags & ACC_INTERFACE)
+    fprintf (stream, (flags & ACC_ANNOTATION) ? " @interface" : " interface");
+  if (flags & ACC_ENUM) fprintf (stream, " enum");
   if (flags & ACC_STRICT) fprintf (stream, " strictfp");
+  if (flags & ACC_SYNTHETIC) fprintf (stream, " synthetic");
 }
 
 


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