On Tue, 2005-10-25 at 09:36 -0400, Daniel Berlin wrote: > On Tue, 2005-10-25 at 10:13 +0530, Ranjit Mathew wrote: > > On 10/25/05, Mike Stump <[EMAIL PROTECTED]> wrote: > > > > > > > > First off, several fields are marked "skip", though the > > > > documents seem to strongly discourage this. For example, > > > > see ssa_use_operand_t in tree.h. > > > > > > Was this a question? :-) Skipping is anti-social and decreases the > > > flexibility of the software, that said, one can skip any field that > > > doesn't need to be walked without any technical problems, as that > > > field doesn't need to be walked. > > > > Thanks. Though I didn't frame the question properly (sorry), > > I wanted to know why we would want some fields of some > > nodes to be skipped. Is it because: > > > > 1. we want to reduce time spent in the GC, > > > > Some people do this, but it doesn't really help, and will cause problems > later if we ever change the type of GC we have. >
You need to do it if the structure is not managed by the garbage collector, but is contained in a structure which is. The garbage collector insists on being made aware of whats in the structure in this case. The operand cache is managed separately, and completely disposed of when ssa is free'd. It is included in other structures, such as tree_ssa_name which *is* garbage collected. The skip tells the garbage collector to ignore any memory pointer to by ssa_use_operand_t since it isn't GC managed. Andrew