Class SyntheticIR
java.lang.Object
com.ibm.wala.ssa.IR
com.ibm.wala.ipa.summaries.SyntheticIR
- All Implemented Interfaces:
IRView
- Direct Known Subclasses:
SummarizedMethodWithNames.SyntheticIRWithNames
-
Nested Class Summary
Nested classes/interfaces inherited from class IR
IR.SSA2LocalMapModifier and TypeClassDescriptionstatic interfaceA Map that gives the names of the local variables corresponding to SSA value numbers at particular IR instruction indices, if such information is available from source code mapping. -
Constructor Summary
ConstructorsConstructorDescriptionSyntheticIR(IMethod method, Context context, AbstractCFG<?, ?> cfg, SSAInstruction[] instructions, SSAOptions options, Map<Integer, @NonNull ConstantValue> constants) Create an SSA form, induced over a list of instructions provided externally. -
Method Summary
Modifier and TypeMethodDescriptionprotected SSAIndirectionData<SSAIndirectionData.Name> subclasses must provide information about indirect use of values, if appropriate, and otherwise nullThis returns null, as synthetic IRs have no local names right now.protected StringinstructionPosition(int instructionIndex) This returns "", as synthetic IRs have no line numbers right now.Methods inherited from class IR
getBasicBlockForCatch, getBasicBlockForInstruction, getBasicBlocksForCall, getBlocks, getCallInstructionIndices, getCalls, getControlFlowGraph, getExitBlock, getInstructions, getLocalNames, getMethod, getNew, getNewInstructionIndex, getNumberOfParameters, getOptions, getParameter, getParameterType, getParameterValueNumbers, getPEI, getSymbolTable, isEmptyIR, iterateAllInstructions, iterateCallSites, iterateCatchInstructions, iterateNewSites, iterateNormalInstructions, iteratePhis, iteratePis, setupLocationMap, toString, visitAllInstructions, visitNormalInstructionsModifier and TypeMethodDescriptiongetBasicBlockForCatch(SSAGetCaughtExceptionInstruction instruction) Return theISSABasicBlockcorresponding to a particular catch instructionThis is space-inefficient.Return the instruction indices corresponding to a call site.getCalls(CallSiteReference site) Return the invoke instructions corresponding to a call siteReturns the normal instructions.String[]getLocalNames(int index, int vn) getNew(NewSiteReference site) Return the new instruction corresponding to an allocation siteintReturn the instruction index corresponding to an allocation siteintintgetParameter(int i) getParameterType(int i) Get theTypeReferencethat describes the ith parameter to this method.int[]getPEI(ProgramCounter pc) booleanTODO: why do we need this? We should enforce instructions == null if necessary, I think.Iterator<? extends SSAInstruction> Return anIteratorof allSSAPhiInstructions for this IR.Iterator<? extends SSAInstruction> Return anIteratorof allSSAPiInstructions for this IR.protected voidcreate mappings from call sites, new sites, and PEIs to instruction indextoString()voidvisit each instruction in this IRvoidvisit each normal (non-phi, non-pi, non-catch) instruction in this IR
-
Constructor Details
-
SyntheticIR
public SyntheticIR(IMethod method, Context context, AbstractCFG<?, ?> cfg, SSAInstruction[] instructions, SSAOptions options, Map<Integer, @NonNull ConstantValue> constants) throws AssertionErrorCreate an SSA form, induced over a list of instructions provided externally. This entrypoint is often used for, e.g., native method models- Parameters:
method- the method to construct SSA form forcontext- the governing contextinstructions- the SSA instructions which define the body of the methodconstants- a Map giving information on constant values for the symbol table- Throws:
AssertionError- if method is null
-
-
Method Details
-
instructionPosition
This returns "", as synthetic IRs have no line numbers right now.- Specified by:
instructionPositionin classIR- Returns:
- a String which is a readable representation of the instruction position corresponding to an instruction index
-
getLocalMap
This returns null, as synthetic IRs have no local names right now.- Specified by:
getLocalMapin classIR
-
getIndirectionData
Description copied from class:IRsubclasses must provide information about indirect use of values, if appropriate, and otherwise null- Specified by:
getIndirectionDatain classIR
-