[Soot-list] Assignments to a matrix in Jimple

Cristina Ilie crysgirlro at yahoo.com
Fri Jun 18 04:25:10 EDT 2010


Hi,

I observed that an assignment like that: "M[0][0] = 2*x[0];" translates in Jimple so:

        $r0= M[0];
        $d0 = x[0];
        $d1 = 2.0 * $d0;
        $r0[0] = $d1;
 where $r0 is vector and it retains the first line from the matrix.

I have a problem with this, because if I have later an assignment like this: "$z[0] = M[0][0]" - it will create a new temporal variable $r1 which will be put into z. But $r1 doesn't contain the value "2*x[0]". I think to add after processing  "M[0][0] = 2*x[0];"  the assignment M[0] = $r0. But is hard to determine when it finish the use of $r0. 

It's something I am missing?

Thanks,
Cristina


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100618/7ea9bce4/attachment.html 


More information about the Soot-list mailing list