public class TypeSafeInstructionFactory extends Object
JavaLanguage.JavaInstructionFactory| Modifier and Type | Field and Description |
|---|---|
protected IClassHierarchy |
cha |
protected JavaLanguage.JavaInstructionFactory |
insts |
| Constructor and Description |
|---|
TypeSafeInstructionFactory(IClassHierarchy cha) |
| Modifier and Type | Method and Description |
|---|---|
SSAArrayLoadInstruction |
ArrayLoadInstruction(int iindex,
SSAValue result,
SSAValue array,
int index)
result = array[index].
|
SSAArrayStoreInstruction |
ArrayStoreInstruction(int iindex,
SSAValue array,
int index,
SSAValue value)
array[index] = value.
|
SSAConditionalBranchInstruction |
ConditionalBranchInstruction(int iindex,
com.ibm.wala.shrikeBT.IConditionalBranchInstruction.IOperator operator,
TypeReference type,
int val1,
int val2,
int target) |
SSAGetInstruction |
GetInstruction(int iindex,
SSAValue targetValue,
FieldReference field)
Reads static field into targetValue.
|
SSAGetInstruction |
GetInstruction(int iindex,
SSAValue targetValue,
SSAValue containingInstance,
FieldReference field)
targetValue = containingInstance.field.
|
SSAGotoInstruction |
GotoInstruction(int iindex,
int target)
Unconditionally jump to a (non-Phi) Instruction.
|
SSAInvokeInstruction |
InvokeInstruction(int iindex,
List<? extends SSAValue> params,
SSAValue exception,
CallSiteReference site)
Instruction that calls a void-method.
|
SSAInvokeInstruction |
InvokeInstruction(int iindex,
SSAValue result,
List<? extends SSAValue> params,
SSAValue exception,
CallSiteReference site)
result = site(params).
|
boolean |
isAssignableFrom(TypeReference from,
TypeReference to) |
SSANewInstruction |
NewInstruction(int iindex,
SSAValue result,
NewSiteReference site) |
SSANewInstruction |
NewInstruction(int iindex,
SSAValue result,
NewSiteReference site,
Collection<? extends SSAValue> params) |
SSAPhiInstruction |
PhiInstruction(int iindex,
SSAValue result,
Collection<? extends SSAValue> params)
Combine SSA-Values into a newone.
|
SSAPutInstruction |
PutInstruction(int iindex,
SSAValue newValue,
FieldReference field)
Writes newValue to static field.
|
SSAPutInstruction |
PutInstruction(int iindex,
SSAValue targetInstance,
SSAValue newValue,
FieldReference field)
Writes newValue to field of targetInstance.
|
SSAReturnInstruction |
ReturnInstruction(int iindex)
Return from a void-function.
|
SSAReturnInstruction |
ReturnInstruction(int iindex,
SSAValue result)
Check if the type of the SSAValue is assignable to the return-value of the method it's valid in.
|
protected final JavaLanguage.JavaInstructionFactory insts
protected final IClassHierarchy cha
public TypeSafeInstructionFactory(IClassHierarchy cha)
public SSAInvokeInstruction InvokeInstruction(int iindex, SSAValue result, List<? extends SSAValue> params, SSAValue exception, CallSiteReference site)
iindex - Zero or a positive number unique to any instruction of the same methodresult - Where to place the return-value of the called method. Is SSAValue.setAssigned() automatically.params - Parameters to the call starting with the implicit this-pointer if necessaryexception - An SSAValue receiving the exception-object when something in the method throws unhandledsite - The CallSiteReference to this call.com.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.InvokeInstruction(int, int, int[], int, CallSiteReference)public SSAInvokeInstruction InvokeInstruction(int iindex, List<? extends SSAValue> params, SSAValue exception, CallSiteReference site)
iindex - Zero or a positive number unique to any instruction of the same methodparams - Parameters to the call starting with the implicit this-pointer if necessaryexception - An SSAValue receiving the exception-object when something in the method throws unhandledsite - The CallSiteReference to this call.com.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.InvokeInstruction(int, int[], int, CallSiteReference)public SSAReturnInstruction ReturnInstruction(int iindex, SSAValue result)
iindex - Zero or a positive number unique to any instruction of the same methodresult - SSAValue to return _with_ validIn _set_!IllegalArgumentException - if result has no validIn setcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.ReturnInstruction(int, int, boolean)public SSAGetInstruction GetInstruction(int iindex, SSAValue targetValue, SSAValue containingInstance, FieldReference field)
iindex - Zero or a positive number unique to any instruction of the same methodtargetValue - the result of the GetInstruction is placed therecontainingInstance - The Object instance to read the field fromfield - The description of the fieldcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.GetInstruction(int, int, int, FieldReference)public SSAGetInstruction GetInstruction(int iindex, SSAValue targetValue, FieldReference field)
iindex - Zero or a positive number unique to any instruction of the same methodtargetValue - the result of the GetInstruction is placed therecontainingInstance - The Object instance to read the field fromfield - The description of the fieldcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.GetInstruction(int, int, int, FieldReference)public SSAPutInstruction PutInstruction(int iindex, SSAValue targetInstance, SSAValue newValue, FieldReference field)
iindex - Zero or a psitive number unique to any instruction of the same methodtargetInstance - the instance of the object to write a field ofnewValue - The value to write to the fieldfield - The description of the targetcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.PutInstruction(int, int, int, FieldReference)public SSAPutInstruction PutInstruction(int iindex, SSAValue newValue, FieldReference field)
iindex - Zero or a psitive number unique to any instruction of the same methodtargetInstance - the instance of the object to write a field ofnewValue - The value to write to the fieldfield - The description of the targetcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.PutInstruction(int, int, int, FieldReference)public SSANewInstruction NewInstruction(int iindex, SSAValue result, NewSiteReference site)
public SSANewInstruction NewInstruction(int iindex, SSAValue result, NewSiteReference site, Collection<? extends SSAValue> params)
public SSAPhiInstruction PhiInstruction(int iindex, SSAValue result, Collection<? extends SSAValue> params)
iindex - Zero or a positive number unique to any instruction of the same methodresult - Where to write result toparams - at least one SSAValue to read fromcom.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory.PhiInstruction(int, int, int[])public boolean isAssignableFrom(TypeReference from, TypeReference to)
public SSAReturnInstruction ReturnInstruction(int iindex)
iindex - Zero or a positive number unique to any instruction of the same methodpublic SSAGotoInstruction GotoInstruction(int iindex, int target)
target - the iindex of the instruction to jump topublic SSAConditionalBranchInstruction ConditionalBranchInstruction(int iindex, com.ibm.wala.shrikeBT.IConditionalBranchInstruction.IOperator operator, TypeReference type, int val1, int val2, int target)
public SSAArrayLoadInstruction ArrayLoadInstruction(int iindex, SSAValue result, SSAValue array, int index)
result - The SSAValue to store the loaded stuff inarray - The array to load fromindex - Te position in array to load frompublic SSAArrayStoreInstruction ArrayStoreInstruction(int iindex, SSAValue array, int index, SSAValue value)
array - the array to store toindex - the position in the array to place value atvalue - The SSAValue to store in the arrayCopyright © 2015. All rights reserved.