This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [C] Move struct constructor_range_stack and struct init_node allocations from GC to obstacks
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Laurynas Biveinis <laurynas dot biveinis at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Apr 2010 15:28:44 +0000 (UTC)
- Subject: Re: [PATCH] [C] Move struct constructor_range_stack and struct init_node allocations from GC to obstacks
- References: <x2vd1e3ff2b1004210722x44a29905j6fd33effd0fec7ee@mail.gmail.com>
On Wed, 21 Apr 2010, Laurynas Biveinis wrote:
> I put those objects in an obstack instead. A big part of the patch is
> related to just passing down a pointer to the obstack from the
> function which defines life time for these objects
> (c_parser_braced_init) to the functions which do the actual allocation
> (push_range_stack and add_pending_init) with quite a few intermediate
> functions. Not perfect, but IMHO much better than a global variable.
It would be better to have an actual initialization context pointer passed
down that includes everything presently in constructor_* static variables
as well as this obstack pointer, but that's not required for this patch.
> OK for trunk?
OK with the various places where you introduce indentation with spaces
fixed to use TABs.
--
Joseph S. Myers
joseph@codesourcery.com