Class LocalAllocator
java.lang.Object
com.ibm.wala.shrike.shrikeBT.info.LocalAllocator
- All Implemented Interfaces:
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
Modifier and TypeMethodDescriptionstatic 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, String type) booleannotifyUpdate(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap) This should not be called by clients.
-
Method Details
-
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
Allocates a new local variable of the specified type.- Throws:
IllegalArgumentException
-
allocate
- Throws:
IllegalArgumentException
-
allocate
Allocates a new local that will fit any type.- Throws:
IllegalArgumentException
-