[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to assign RefType parameter in Jimple?
Hi Richard,
I donot think it is a problem, if the translated program ensures the
correctness of semantics, it is correct. Why do you care of the relation
between r3 and r2 in this case? A program analysis is likely to translate
the program to a quite different form from the original one.
Cheers,
-- Feng
On Wed, 4 Jun 2003, Richard Stahl wrote:
> Hello,
>
> I would like to know how is it possible to find a corespondence between
> the local RefType variable and parameter variable if I would like to
> assign from local to parameter?
>
> Example:
>
> JAVA code:
>
> private Row exchange;
>
> public void setRow(Row row) {
> Row r = exchange;
> r = row;
> }
>
> public void getRow(Row row) {
> row = exchange;
> }
>
> and corresponding JIMPLE code:
>
> public void setRow(Row )
> {
> Producer r0;
> Row r1, r2, r3;
>
> r0 := @this: Producer;
> r1 := @parameter0: Row;
> r2 = r0.<PC: Row exchange>;
> r3 = r1;
> return;
> }
>
> public void getRow(Row )
> {
> Producer r0;
> Row r1, r2;
>
> r0 := @this: Producer;
> r1 := @parameter0: Row;
> r2 = r0.<PC: Row exchange>;
> return;
> }
>
> 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.
>
> Thank you very much in advance.
>
> Best regards,
>
> Richard
>
>