Garbage collect TYPE_STATIC and several TYPE_FN_FIELD_x
authorPedro Alves <palves@redhat.com>
Tue, 4 Jul 2017 17:40:26 +0000 (18:40 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 4 Jul 2017 17:40:26 +0000 (18:40 +0100)
Nothing uses these.  Most of the TYPE_FN_FIELD_ ones were probably
used by the gcj support.

gdb/ChangeLog:
2017-07-04  Pedro Alves  <palves@redhat.com>

* gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
* gdbtypes.h (TYPE_STATIC): Delete.
(struct fn_field) <is_public, is_abstract, is_static, is_final,
is_synchronized, is_native>: Delete.
<dummy>: Bump.
(TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
(TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
(TYPE_FN_FIELD_ABSTRACT): Delete.

gdb/ChangeLog
gdb/gdbtypes.c
gdb/gdbtypes.h

index 2451ba70d5b6c61e72eecf693f588024821cf1c1..03f30affa594d65a95852fdd9ac40f8a539a91e8 100644 (file)
@@ -1,3 +1,14 @@
+2017-07-04  Pedro Alves  <palves@redhat.com>
+
+       * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
+       * gdbtypes.h (TYPE_STATIC): Delete.
+       (struct fn_field) <is_public, is_abstract, is_static, is_final,
+       is_synchronized, is_native>: Delete.
+       <dummy>: Bump.
+       (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
+       (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
+       (TYPE_FN_FIELD_ABSTRACT): Delete.
+
 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
 
        * buffer.h (buffer_finish): Fix spelling mistakes.
index c9a9b3d9f835520b6232766b2158d53a80c0e2ff..a68692341eacd40c6b3f61e0832b9f512e954c9d 100644 (file)
@@ -4444,10 +4444,6 @@ recursive_dump_type (struct type *type, int spaces)
     {
       puts_filtered (" TYPE_TARGET_STUB");
     }
-  if (TYPE_STATIC (type))
-    {
-      puts_filtered (" TYPE_STATIC");
-    }
   if (TYPE_PROTOTYPED (type))
     {
       puts_filtered (" TYPE_PROTOTYPED");
index 6f896dbb446dcec59145ae32762fbd358e0c01bd..d2018a810800398ba8069bc599b172b9edde3659 100644 (file)
@@ -221,13 +221,6 @@ enum type_instance_flag_value
 
 #define TYPE_TARGET_STUB(t)    (TYPE_MAIN_TYPE (t)->flag_target_stub)
 
-/* * Static type.  If this is set, the corresponding type had 
-   a static modifier.
-   Note: This may be unnecessary, since static data members
-   are indicated by other means (bitpos == -1).  */
-
-#define TYPE_STATIC(t)         (TYPE_MAIN_TYPE (t)->flag_static)
-
 /* * This is a function type which appears to have a prototype.  We
    need this for function calls in order to tell us if it's necessary
    to coerce the args, or to just do the standard conversions.  This
@@ -844,12 +837,6 @@ struct fn_field
   unsigned int is_volatile:1;
   unsigned int is_private:1;
   unsigned int is_protected:1;
-  unsigned int is_public:1;
-  unsigned int is_abstract:1;
-  unsigned int is_static:1;
-  unsigned int is_final:1;
-  unsigned int is_synchronized:1;
-  unsigned int is_native:1;
   unsigned int is_artificial:1;
 
   /* * A stub method only has some fields valid (but they are enough
@@ -863,7 +850,7 @@ struct fn_field
 
   /* * Unused.  */
 
-  unsigned int dummy:3;
+  unsigned int dummy:9;
 
   /* * Index into that baseclass's virtual function table, minus 2;
      else if static: VOFFSET_STATIC; else: 0.  */
@@ -1405,13 +1392,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
 #define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)
 #define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)
 #define TYPE_FN_FIELD_PROTECTED(thisfn, n) ((thisfn)[n].is_protected)
-#define TYPE_FN_FIELD_PUBLIC(thisfn, n) ((thisfn)[n].is_public)
-#define TYPE_FN_FIELD_STATIC(thisfn, n) ((thisfn)[n].is_static)
-#define TYPE_FN_FIELD_FINAL(thisfn, n) ((thisfn)[n].is_final)
-#define TYPE_FN_FIELD_SYNCHRONIZED(thisfn, n) ((thisfn)[n].is_synchronized)
-#define TYPE_FN_FIELD_NATIVE(thisfn, n) ((thisfn)[n].is_native)
 #define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n) ((thisfn)[n].is_artificial)
-#define TYPE_FN_FIELD_ABSTRACT(thisfn, n) ((thisfn)[n].is_abstract)
 #define TYPE_FN_FIELD_STUB(thisfn, n) ((thisfn)[n].is_stub)
 #define TYPE_FN_FIELD_CONSTRUCTOR(thisfn, n) ((thisfn)[n].is_constructor)
 #define TYPE_FN_FIELD_FCONTEXT(thisfn, n) ((thisfn)[n].fcontext)