[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying CFG



On Thu, Jun 17, 2004 at 01:15:49PM +0200, Marco Bakera wrote:
> Hey,
> 
> is there any possibility to change the CFG - which seems to be represented
> in the Unitgraph - without having to do it with the units? I just want to

The UnitGraph is designed to be immutable. If you need to insert a Unit,
the normal way is to insert it into the Chain of Units. Then, if you
still need a CFG, you can have Soot rebuild it from the Chain of Units.

I don't understand what you mean by "without having to check which kind
of statement the unit belongs to".

Ondrej

> insert a Unit (a kind of AssignStmt) in the Unitgraph between to other
> units. Is there an elegant method to do this without having to check which
> kind of statement the unit belongs to and just inserting it?
> 
> Thanks for help.
> Marco.
> 
> --
> /X\arco
>               . .
> ---------oOOo-(_)-oOOo--------> www.bakera.de <--