public class CallWeaver
extends java.lang.Object
An explanation of some terms used in the code may be useful.
Much of this code concerns itself with storing and retrieving values from/to
the stack and the local variables. The stack consists of three logical parts:
+--------------+----------------------+---------------+ | Stack bottom | callee obj reference | args for call | (Top of stack) +--------------+----------------------+---------------+The callee's object reference and the arguments at the top of stack are consumed by the method invocation. If the call is static, there is no object reference, of course. The bottom of the stack (which may also be empty) refers to the part of the stack that is left over once the args are consumed. This is the part that we need to save if we have to yield.
As for the local variables, we are interested in saving var 0 (the "this" pointer) and all other variables that the flow analysis has shown to be live-in, that is, is used downstream of the call. Typically, only about 30% of all available vars are actually used downstream, so we use the rest for temporary storage.
| Constructor and Description |
|---|
CallWeaver(MethodWeaver mw,
Detector d,
BasicBlock aBB) |
public CallWeaver(MethodWeaver mw, Detector d, BasicBlock aBB)