Package com.ibm.wala.shrikeBT.info
Class LocalAllocator
- java.lang.Object
-
- com.ibm.wala.shrikeBT.info.LocalAllocator
-
- All Implemented Interfaces:
MethodData.Results
public class LocalAllocator extends Object implements MethodData.Results
This method annotation parcels out fresh local variables for use as temporaries by instrumentation code. It assumes that local variables are not allocated by any other mechanism.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
allocate(MethodData info)
Allocates a new local that will fit any type.static int
allocate(MethodData info, int count)
Allocates a new local variable of the specified type.static int
allocate(MethodData info, String type)
boolean
notifyUpdate(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap)
This should not be called by clients.
-
-
-
Method Detail
-
notifyUpdate
public boolean notifyUpdate(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap)
This should not be called by clients.- Specified by:
notifyUpdate
in interfaceMethodData.Results
- Parameters:
info
- the method data this annotation is attached tonewInstructions
- the instructions the method will change tonewHandlers
- the handler lists the method will change tonewInstructionMap
- the instructions-to-bytecodes map the method will change to- Returns:
- true to remove the object from the info set, for example because the annotation is now invalid
-
allocate
public static int allocate(MethodData info, int count) throws IllegalArgumentException
Allocates a new local variable of the specified type.- Throws:
IllegalArgumentException
-
allocate
public static int allocate(MethodData info, String type) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
allocate
public static int allocate(MethodData info) throws IllegalArgumentException
Allocates a new local that will fit any type.- Throws:
IllegalArgumentException
-
-