This is the mail archive of the
mailing list for the GCC project.
[PATCH v2 0/4] Support some cases of inheritance in gengtype
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Tue, 24 Sep 2013 13:49:27 -0400
- Subject: [PATCH v2 0/4] Support some cases of inheritance in gengtype
- Authentication-results: sourceware.org; auth=none
- References: <1379685919-9437-1-git-send-email-dmalcolm at redhat dot com>
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(-)