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]

Re: C++ PATCH: PR 21687

On Fri, 2005-09-02 at 11:52 -0700, Mark Mitchell wrote:
> Daniel Berlin wrote:
> > On Fri, 2005-09-02 at 11:31 -0700, Mark Mitchell wrote:
> > 
> >>We were missing ggc_push_context calls around functions in local
> >>classes; we want to collect within those functions, but we have local
> >>state that is not in GC roots.
> > Is there some reason we've chosen not to do the same here?
> Because we don't know what the local state is.  We're deep in the midst 
> of parsing one function, and now enter another. 

If it's not your local state, something else should be marking it.

>  The other choice is to 
> eliminate the ggc_collect call in expand_or_defer_fn in cp/semantics.c 
> when in a local class, i.e, if function_depth.  That will result in 
> potentially piling up a lot of garbage, but it should work I guess.
> If we're not supposing to be using ggc_push_context, why wasn't that 
> code removed?  There's no way to know that it's not supposed to be used 
> anymore.

Yeah, i won't claim we shouldn't have removed the functions.

I could reimplement support for them in zone, but it would be ugly. :)
Your call.

I don't like that we've needed to put a lot of things in GC just so we
can mark things from them (IE there is no way to mark pointers in
non-gc'd memory).

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