Thank you everyone for the input.
s.succs is mutable, then how can it be read-only? Also how do we recognize
other such fields in Cil?
-Divya
On Mon, Apr 27, 2009 at 4:04 PM, Gabriel Kerneis <kern...@pps.jussieu.fr>wrote:
> On Mon, Apr 27, 2009 at 02:14:45PM -0400, Elnatan Reisner wrote:
> > I don't know why changing s.succs didn't work,
>
> Because this is a read-only field, computed by Cfg. It contains
> control-flow
> graph information, nothing else.
>
> > but I think you should be able to use ChangeTo if you replace 's' with a
> > statement with skind Block and put the list of statements you want into
> that
> > Block.
>
> Indeed. I do this all the time in CPC and it works very well.
>
> http://www.pps.jussieu.fr/~kerneis/software/repos/cpc/stable/src/ext/cpc.ml<http://www.pps.jussieu.fr/%7Ekerneis/software/repos/cpc/stable/src/ext/cpc.ml>
> Look for example at add_goto src dst which adds a goto to dst just after
> src.
>
> Regards,
> --
> Gabriel Kerneis
>
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users