This is the mail archive of the gcc-patches@gcc.gnu.org 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: [tree-ssa] Make tsi insert iterators handle chains ofCOMPOUND_EXPRs


On Fri, 2003-08-29 at 13:07, Zdenek Dvorak wrote:
> Hello,
> 
> > > > > will put b in the middle of a; which is inconsistend with the fact that
> > > > > tsi_link_before would not.
> > > 
> > > aw, sorry, I of course meant
> > >  	tsi_link_after (tsi, a, TSI_NEW_STMT);
> > > 	tsi_link_after (tsi, b, TSI_NEW_STMT);
> > 
> > Ok, so?  Your proposal does not differ from mine in this respect.
> > If the user does this, it's just a bug in their code.
> 
> and we don't want to support making bugs in code, do we? IMHO it would
> be better if the meaning of flags was consistent (i.e. CHAIN_END -- I
> want to continue adding other statements in this direction, NEW_STMT --
> I want to process the newly added members).

TSI_NEW_STMT means return an iterator which points to the new stmt which
was inserted.    There is some abiguity about what this means in the
context of a list of stmt's so I would suggest that if we go to a new
function for inserting a chain of stmt's, that TSI_NEW_STMT is no longer
a valid enumeration for that function, and that we have something like
   TSI_SAME_STMT, TSI_HEAD_STMT, TSI_END_STMT valid for the new
function.

That removes any ambiguity, and makes it pretty clear as to whats going
on I think. 

Andrew


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