This is the mail archive of the 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]

[PATCH v2 0/4] Support some cases of inheritance in gengtype

Here's an updated version of the patch series.

Changes since v1 of the patch series:

  * Patch 1/4: this one is new: I noticed that the "public:" specifier
    within class cgraph_node confused gengtype, leading it to erroneously
    omit the first field within the class.  This patch fixes this bug.

  * Patch 2/4: this is the updated parser support for base classes.  In
    the previous version of the patch, it only attempted to parse the
    base classes of GTY()-marked types.  In this version of the patch it
    only attempts to pass the bases of GTY()-marked types that are *not*
    marked with GTY((user)) i.e. it ignores GTY((user)) types.

  * Patch 3/4: this version incorporates suggestions by Michael Matz:
    set_gc_used_type now visits base classes, and all inherited fields,
    not just those in the class itself, and fixes the stylistic nits he
    noted.   walk_subclasses now only writes out cases for concrete
    subclasses i.e. those with a "tag" GTY option.  Similarly, I updated
    USED_BY_TYPED_GC_P so that it emits allocators etc for subclasses
    with a "tag" GTY option.  I didn't fix the O(N^2) in walk_subclasses
    (it doesn't seem to affect the speed of the build).

  * Patch 4/4: this is new: it adds documentation to gty.texi about
    how "desc" and "tag" can be used for class hierarchies.

Successfully bootstrapped and regtested together with the symtab patches
posted earlier, which port symtab/cgraph/varpool to use this machinery.

OK for trunk?

David Malcolm (4):
  Ignore access-control keywords when parsing fields.
  Parse base classes for GTY-marked types
  Handle simple inheritance in gengtype.
  Add documentation about gengtype and inheritance

 gcc/doc/gty.texi     |  52 +++++++++++++++++++++++
 gcc/gengtype-parse.c |  63 ++++++++++++++++++++++++---
 gcc/gengtype-state.c |   2 +
 gcc/gengtype.c       | 117 +++++++++++++++++++++++++++++++++++++++++++++------
 gcc/gengtype.h       |  12 +++++-
 5 files changed, 226 insertions(+), 20 deletions(-)


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