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 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 Details
-
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
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
-