remove mark_hook gty attribute

gcc/ChangeLog:

2016-01-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR middle-end/54809
	* doc/gty.texi: Remove documentation of mark_hook.
	* gengtype.c (struct write_types_data): Remove code to support
	mark_hook attribute.
	(walk_type): Likewise.
	(write_func_for_structure): Likewise.

From-SVN: r232309
This commit is contained in:
Trevor Saunders 2016-01-13 02:51:11 +00:00 committed by Trevor Saunders
parent bf3f4b389a
commit 36365906b7
3 changed files with 12 additions and 40 deletions

View File

@ -1,3 +1,12 @@
2016-01-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
PR middle-end/54809
* doc/gty.texi: Remove documentation of mark_hook.
* gengtype.c (struct write_types_data): Remove code to support
mark_hook attribute.
(walk_type): Likewise.
(write_func_for_structure): Likewise.
2016-01-12 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (Option Summary) Move -no-canonical-prefixes to

View File

@ -261,16 +261,6 @@ garbage collection runs, there's no need to mark anything pointed to
by this variable, it can just be set to @code{NULL} instead. This is used
to keep a list of free structures around for re-use.
@findex mark_hook
@item mark_hook ("@var{hook-routine-name}")
If provided for a structure or union type, the given
@var{hook-routine-name} (between double-quotes) is the name of a
routine called when the garbage collector has just marked the data as
reachable. This routine should not change the data, or call any ggc
routine. Its only argument is a pointer to the just marked (const)
structure or union.
@findex maybe_undef
@item maybe_undef

View File

@ -2407,7 +2407,6 @@ struct write_types_data
const char *marker_routine;
const char *reorder_note_routine;
const char *comment;
int skip_hooks; /* skip hook generation if non zero */
enum write_types_kinds kind;
};
@ -2677,8 +2676,6 @@ walk_type (type_p t, struct walk_type_data *d)
maybe_undef_p = 1;
else if (strcmp (oo->name, "desc") == 0 && oo->kind == OPTION_STRING)
desc = oo->info.string;
else if (strcmp (oo->name, "mark_hook") == 0)
;
else if (strcmp (oo->name, "nested_ptr") == 0
&& oo->kind == OPTION_NESTED)
nested_ptr_d = (const struct nested_ptr_data *) oo->info.nested;
@ -2918,7 +2915,6 @@ walk_type (type_p t, struct walk_type_data *d)
const char *oldval = d->val;
const char *oldprevval1 = d->prev_val[1];
const char *oldprevval2 = d->prev_val[2];
const char *struct_mark_hook = NULL;
const int union_p = t->kind == TYPE_UNION;
int seen_default_p = 0;
options_p o;
@ -2942,13 +2938,6 @@ walk_type (type_p t, struct walk_type_data *d)
if (!desc && strcmp (o->name, "desc") == 0
&& o->kind == OPTION_STRING)
desc = o->info.string;
else if (!struct_mark_hook && strcmp (o->name, "mark_hook") == 0
&& o->kind == OPTION_STRING)
struct_mark_hook = o->info.string;
if (struct_mark_hook)
oprintf (d->of, "%*s%s (&%s);\n",
d->indent, "", struct_mark_hook, oldval);
d->prev_val[2] = oldval;
d->prev_val[1] = oldprevval2;
@ -3473,7 +3462,6 @@ write_func_for_structure (type_p orig_s, type_p s,
const char *chain_next = NULL;
const char *chain_prev = NULL;
const char *chain_circular = NULL;
const char *mark_hook_name = NULL;
options_p opt;
struct walk_type_data d;
@ -3509,9 +3497,6 @@ write_func_for_structure (type_p orig_s, type_p s,
else if (strcmp (opt->name, "chain_circular") == 0
&& opt->kind == OPTION_STRING)
chain_circular = opt->info.string;
else if (strcmp (opt->name, "mark_hook") == 0
&& opt->kind == OPTION_STRING)
mark_hook_name = opt->info.string;
else if (strcmp (opt->name, "for_user") == 0)
for_user = true;
if (chain_prev != NULL && chain_next == NULL)
@ -3576,17 +3561,11 @@ write_func_for_structure (type_p orig_s, type_p s,
oprintf (d.of, "))\n");
if (chain_circular != NULL)
oprintf (d.of, " return;\n do\n");
if (mark_hook_name && !wtd->skip_hooks)
{
oprintf (d.of, " {\n");
oprintf (d.of, " %s (xlimit);\n ", mark_hook_name);
}
oprintf (d.of, " xlimit = (");
d.prev_val[2] = "*xlimit";
output_escaped_param (&d, chain_next, "chain_next");
oprintf (d.of, ");\n");
if (mark_hook_name && !wtd->skip_hooks)
oprintf (d.of, " }\n");
if (chain_prev != NULL)
{
oprintf (d.of, " if (x != xlimit)\n");
@ -3618,18 +3597,12 @@ write_func_for_structure (type_p orig_s, type_p s,
output_mangled_typename (d.of, orig_s);
}
oprintf (d.of, "));\n");
if (mark_hook_name && !wtd->skip_hooks)
oprintf (d.of, " %s (xlimit);\n", mark_hook_name);
oprintf (d.of, " do\n");
}
else
oprintf (d.of, " while (x != xlimit)\n");
}
oprintf (d.of, " {\n");
if (mark_hook_name && chain_next == NULL && !wtd->skip_hooks)
{
oprintf (d.of, " %s (x);\n", mark_hook_name);
}
d.prev_val[2] = "*x";
d.indent = 6;
@ -3789,14 +3762,14 @@ write_types (outf_p output_header, type_p structures,
static const struct write_types_data ggc_wtd = {
"ggc_m", NULL, "ggc_mark", "ggc_test_and_set_mark", NULL,
"GC marker procedures. ",
FALSE, WTK_GGC
WTK_GGC
};
static const struct write_types_data pch_wtd = {
"pch_n", "pch_p", "gt_pch_note_object", "gt_pch_note_object",
"gt_pch_note_reorder",
"PCH type-walking procedures. ",
TRUE, WTK_PCH
WTK_PCH
};
/* Write out the local pointer-walking routines. */