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

Re: How to assign RefType parameter in Jimple?



Richard Stahl <richard.stahl@imec.be> wrote:
> method setRow set the actual Row to the parameter type yet I can not see 
> the relation between r3 and r2 in the code!
> 
> method getRow assigns the parameter ref the Row from this object yet 
> (again) I can not see the relation between r2 and r1 (which is returned)!
> 
> I hope I make the problem understandable. Please, do not look at its 
> usability - it is useless, i.e., I use it for testing purposes.

Could it be that you are confused over the fact that Soot splits
variables by default?  Try the "-p jb use-original-names" option.  I
tested this (on the upcoming Soot 2.0) and got:

    public void getRow(Row)
    {
        Producer l0;
        Row l1, l1;

        l0 := @this: Producer;
        l1 := @parameter0: Row;
        l1 = l0.<Producer: Row exchange>;
        return;
    }

    public void setRow(Row)
    {
        Producer l0;
        Row l1, l2;

        l0 := @this: Producer;
        l1 := @parameter0: Row;
        l2 = l0.<Producer: Row exchange>;
        l2 = l1;
        return;
    }

Does this answer your question?

Cheers,
Navin.