Class DTypeInfo
java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.ir.DTypeInfo
Type information object used to collect typing results when propagating types through an SSA'ed
IR.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDetails about a typing conflict. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintRetrieve the number of type updates.Retrieve the recorded typing conflicts.Retrieve the IR context in which type propagation will take place.Retrieve the type factory associated with the method context.intRetrieve the number of unchanged type propagation results.Retrieve all variable candidate types.getVariableCandidateTypes(int varid) Retrieve candidate types for a variable.intRecord a type update.voidrecordConflict(String msg, IDExpression exp, IJavaType currentType, IJavaType wantedType) Record a typing conflict.intRecord an unchanged type propagation result.voidrecordVariableCandidateType(int varid, IJavaType t) Record a candidate type for a variable.voidreset()Reset counters and recorded conflicts.voidReset the type-change counters.toString()
-
Constructor Details
-
DTypeInfo
Create a type information object.- Parameters:
ctx- method context in which type propagation takes place
-
-
Method Details
-
getContext
Retrieve the IR context in which type propagation will take place.- Returns:
- the method context
-
getTypeFactory
Retrieve the type factory associated with the method context.- Returns:
- the type factory
-
recordConflict
public void recordConflict(String msg, IDExpression exp, IJavaType currentType, IJavaType wantedType) Record a typing conflict.- Parameters:
msg- conflict descriptionexp- expression whose type could not be reconciledcurrentType- current expression typewantedType- requested expression type
-
resetCounters
public void resetCounters()Reset the type-change counters. -
reset
public void reset()Reset counters and recorded conflicts. -
recordChanged
public int recordChanged()Record a type update.- Returns:
- the updated change count
-
getChangedCounter
public int getChangedCounter()Retrieve the number of type updates.- Returns:
- the change count
-
recordUnchanged
public int recordUnchanged()Record an unchanged type propagation result.- Returns:
- the updated unchanged count
-
getUnchangedCounter
public int getUnchangedCounter()Retrieve the number of unchanged type propagation results.- Returns:
- the unchanged count
-
getConflicts
Retrieve the recorded typing conflicts.- Returns:
- an unmodifiable list of conflicts
-
recordVariableCandidateType
Record a candidate type for a variable.- Parameters:
varid- variable idt- candidate type
-
getVariableCandidateTypes
Retrieve candidate types for a variable.- Parameters:
varid- variable id- Returns:
- candidate types, or an empty set if none were recorded
-
getVariableCandidateTypes
Retrieve all variable candidate types.- Returns:
- the candidate type map keyed by variable id
-
toString
-