Class LocalAllocator
- java.lang.Object
-
- com.ibm.wala.shrike.shrikeBT.info.LocalAllocator
-
- All Implemented Interfaces:
MethodData.Results
public class LocalAllocator extends java.lang.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 intallocate(MethodData info)Allocates a new local that will fit any type.static intallocate(MethodData info, int count)Allocates a new local variable of the specified type.static intallocate(MethodData info, java.lang.String type)booleannotifyUpdate(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:
notifyUpdatein 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 java.lang.IllegalArgumentException
Allocates a new local variable of the specified type.- Throws:
java.lang.IllegalArgumentException
-
allocate
public static int allocate(MethodData info, java.lang.String type) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
allocate
public static int allocate(MethodData info) throws java.lang.IllegalArgumentException
Allocates a new local that will fit any type.- Throws:
java.lang.IllegalArgumentException
-
-