[Soot-list] queries on threads (and invokespecial)

Rhodes H. F. Brown rhodesb at cs.uvic.ca
Mon Apr 3 15:49:48 EDT 2006


> On Tue, 4 Apr 2006, Arnab De wrote:
>
>> can anybody tell me what is the actual semantics of specialinvoke?

In passing, although I can't find an explicit reference, I believe  
that the intent of:

>> The invokespecial instruction is used to invoke ... private  
>> methods and
>> methods of a superclass of the current class.

is to allow JIT compilers to avoid the (slow) virtual dispatch  
implementation required for most instance invokes. In other words,  
since the exact type of the receiver is known in both these cases it  
is possible to directly dispatch to the appropriate method (instead  
of looking up the target in a virtual dispatch table), or even inline  
the invoked method entirely.

 From a user's point of view, invokespecial, invokevirtual and  
invokeinterface should all have (more or less) the same semantics --  
certainly, with respect to concurrency and synchronization issues.

-Rhodes


More information about the Soot-list mailing list