[Soot-list] queries on threads
Archie Cobbs
archie at dellroad.org
Mon Apr 3 16:07:29 EDT 2006
Patrick LAM wrote:
> On Tue, 4 Apr 2006, Arnab De wrote:
>> staticinvoke <java.lang.Thread: void yield()>();
>> $r7 = this.<Friendly: Friendly partner>;
>> specialinvoke $r7.<Friendly: void hugBack()>();
>> return;
>> }
>>
>> Please observe that there is a "specialinvoke" in the last but one line
>> (just before the return statement). As far as I understand, specialinvokes
>> are for constructors. Can anyone please tell me why specialinvoke has come
>> here?
>
> That is kind of odd. However, I compiled your Java code and then looked
> at it using javap. It also contains a specialinvoke:
>
> 64: aload_0
> 65: getfield #11; //Field partner:LFriendly;
> 68: invokespecial #16; //Method hugBack:()V
> 71: return
>
> Usually, specialinvoke is used for constructors, but there are certain
> other cases where it can occur. I'm not especially familiar with them.
> In any case, Soot is just processing what it gets.
INVOKESPECIAL is used when invoking private methods. For private
methods, you want non-virtual method dispatch.
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
More information about the Soot-list
mailing list