abc.weaving.residues
Class Load

java.lang.Object
  extended by abc.weaving.residues.Residue
      extended by abc.weaving.residues.Load

public class Load
extends Residue

Load a context value into a local or argument, without boxing or casting

Author:
Ganesh Sittampalam, Ondrej Lhotak

Nested Class Summary
 
Nested classes/interfaces inherited from class abc.weaving.residues.Residue
Residue.Bindings
 
Field Summary
 ContextValue value
           
 WeavingVar variable
           
 
Constructor Summary
Load(ContextValue value, WeavingVar variable)
           
 
Method Summary
 Stmt codeGen(SootMethod method, LocalGeneratorEx localgen, Chain units, Stmt begin, Stmt fail, boolean sense, WeavingContext wc)
          Generate the code for this dynamic residue.
 Residue inline(ConstructorInliningMap cim)
          Make a copy of the residue applying to an inlined version of the code.
 void makeStatic()
          Set the static flag on this load residue, meaning that the join point info only needs static parts, and therefore can be optimized to not include dynamic parts.
 Residue optimize()
          Optimize the residue by rebuilding it, invoking the smart constructors along the way.
 Residue resetForReweaving()
           
 java.lang.String toString()
          Must provide a toString method
 
Methods inherited from class abc.weaving.residues.Residue
getAdviceFormalBindings, getResidueBoxes, restructureToCreateBindingsMask, succeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public ContextValue value

variable

public WeavingVar variable
Constructor Detail

Load

public Load(ContextValue value,
            WeavingVar variable)
Method Detail

optimize

public Residue optimize()
Description copied from class: Residue
Optimize the residue by rebuilding it, invoking the smart constructors along the way.

Specified by:
optimize in class Residue

inline

public Residue inline(ConstructorInliningMap cim)
Description copied from class: Residue
Make a copy of the residue applying to an inlined version of the code.

Specified by:
inline in class Residue

resetForReweaving

public Residue resetForReweaving()
Overrides:
resetForReweaving in class Residue

toString

public java.lang.String toString()
Description copied from class: Residue
Must provide a toString method

Specified by:
toString in class Residue

makeStatic

public void makeStatic()
Set the static flag on this load residue, meaning that the join point info only needs static parts, and therefore can be optimized to not include dynamic parts.


codeGen

public Stmt codeGen(SootMethod method,
                    LocalGeneratorEx localgen,
                    Chain units,
                    Stmt begin,
                    Stmt fail,
                    boolean sense,
                    WeavingContext wc)
Description copied from class: Residue
Generate the code for this dynamic residue.

Specified by:
codeGen in class Residue
Parameters:
method - The method the code is being inserted into
localgen - A local generator for the method
units - The chain the code is being inserted into
begin - Code will be inserted just after this statement
fail - If the residue "fails", the inserted code will jump to this point; otherwise it will fall through
sense - If this is false, inverts the meaning of failure and success for the residue
wc - The weaving context
Returns:
The last statement that was inserted into the chain (or begin if nothing was).