public class InstructionUsageMarker
extends java.lang.Object
implements proguard.classfile.attribute.visitor.AttributeVisitor
| Constructor and Description |
|---|
InstructionUsageMarker(boolean markExternalSideEffects)
Creates a new InstructionUsageMarker.
|
InstructionUsageMarker(proguard.evaluation.PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
boolean markExternalSideEffects)
Creates a new InstructionUsageMarker.
|
InstructionUsageMarker(proguard.evaluation.PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
boolean ensureSafetyForVerifier,
boolean markExternalSideEffects)
Creates a new InstructionUsageMarker.
|
| Modifier and Type | Method and Description |
|---|---|
proguard.evaluation.value.InstructionOffsetValue |
branchTargets(int instructionOffset)
Returns the instruction offsets to which the given instruction offset
branches in the most recently analyzed code attribute.
|
proguard.evaluation.TracedStack |
getStackAfter(int instructionOffset)
Returns the stack after execution of the instruction at the given
offset.
|
proguard.evaluation.TracedStack |
getStackBefore(int instructionOffset)
Returns the stack before execution of the instruction at the given
offset.
|
boolean |
isAnyStackEntryNecessaryAfter(proguard.evaluation.value.InstructionOffsetValue instructionOffsets,
int stackIndex)
Returns whether any of the stack entries after the given offsets are
necessary.
|
boolean |
isExtraPushPopInstructionNecessary(int instructionOffset)
Returns whether an extra push/pop instruction is required at the given
offset in the most recently analyzed code attribute.
|
boolean |
isInstructionNecessary(int instructionOffset)
Returns whether the specified instruction is necessary in the most
recently analyzed code attribute.
|
boolean |
isStackEntriesNecessaryAfter(int instructionOffset,
int stackIndex1,
int stackIndex2)
Returns whether the stack specified entries after the given offset are
necessary.
|
boolean |
isStackEntriesPresentBefore(int instructionOffset,
int stackIndex1,
int stackIndex2)
Returns whether the stack specified entries before the given offset are
present.
|
boolean |
isStackEntryNecessaryAfter(int instructionOffset,
int stackIndex)
Returns whether the specified stack entry after the given offset is
necessary.
|
boolean |
isStackEntryPresentBefore(int instructionOffset,
int stackIndex)
Returns whether the specified stack entry before the given offset is
present.
|
boolean |
isStackEntryUnwantedBefore(int instructionOffset,
int stackIndex)
Returns whether the specified stack entry before the given offset is
unwanted, e.g.
|
boolean |
isTraced(int instructionOffset)
Returns whether the specified instruction was traced in the most
recently analyzed code attribute.
|
proguard.classfile.instruction.visitor.InstructionVisitor |
necessaryInstructionFilter(boolean necessary,
proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary or unnecessary instructions.
|
proguard.classfile.instruction.visitor.InstructionVisitor |
necessaryInstructionFilter(proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary instructions.
|
proguard.classfile.instruction.visitor.InstructionVisitor |
tracedInstructionFilter(boolean traced,
proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced or untraced instructions.
|
proguard.classfile.instruction.visitor.InstructionVisitor |
tracedInstructionFilter(proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced instructions.
|
void |
visitAnyAttribute(proguard.classfile.Clazz clazz,
proguard.classfile.attribute.Attribute attribute) |
void |
visitCodeAttribute(proguard.classfile.Clazz clazz,
proguard.classfile.Method method,
proguard.classfile.attribute.CodeAttribute codeAttribute) |
void |
visitCodeAttribute0(proguard.classfile.Clazz clazz,
proguard.classfile.Method method,
proguard.classfile.attribute.CodeAttribute codeAttribute) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitAnnotationDefaultAttribute, visitAnyAnnotationsAttribute, visitAnyParameterAnnotationsAttribute, visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitEnclosingMethodAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, visitLineNumberTableAttribute, visitLocalVariableTableAttribute, visitLocalVariableTypeTableAttribute, visitMethodParametersAttribute, visitModuleAttribute, visitModuleMainClassAttribute, visitModulePackagesAttribute, visitNestHostAttribute, visitNestMembersAttribute, visitPermittedSubclassesAttribute, visitRecordAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSourceDebugExtensionAttribute, visitSourceDirAttribute, visitSourceFileAttribute, visitStackMapAttribute, visitStackMapTableAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttributepublic InstructionUsageMarker(boolean markExternalSideEffects)
markExternalSideEffects - specifies whether instructions with external side effects should be markedpublic InstructionUsageMarker(proguard.evaluation.PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
boolean markExternalSideEffects)
partialEvaluator - the evaluator to be used for the analysis.runPartialEvaluator - specifies whether to run this evaluator on
every code attribute that is visited.markExternalSideEffects - specifies whether instructions with external side effects should be markedpublic InstructionUsageMarker(proguard.evaluation.PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
boolean ensureSafetyForVerifier,
boolean markExternalSideEffects)
partialEvaluator - the evaluator to be used for the analysis.runPartialEvaluator - specifies whether to run this evaluator on
every code attribute that is visited.ensureSafetyForVerifier - some instructions are not necessary for
code correctness but are necessary for the
java verifier. This flag determines whether
these instructions are visited (default: true).markExternalSideEffects - specifies whether instructions with external side effects should be markedpublic boolean isTraced(int instructionOffset)
public proguard.classfile.instruction.visitor.InstructionVisitor tracedInstructionFilter(proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
public proguard.classfile.instruction.visitor.InstructionVisitor tracedInstructionFilter(boolean traced,
proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
public boolean isInstructionNecessary(int instructionOffset)
public boolean isExtraPushPopInstructionNecessary(int instructionOffset)
public proguard.classfile.instruction.visitor.InstructionVisitor necessaryInstructionFilter(proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
public proguard.classfile.instruction.visitor.InstructionVisitor necessaryInstructionFilter(boolean necessary,
proguard.classfile.instruction.visitor.InstructionVisitor instructionVisitor)
public proguard.evaluation.TracedStack getStackBefore(int instructionOffset)
public proguard.evaluation.TracedStack getStackAfter(int instructionOffset)
public boolean isStackEntryUnwantedBefore(int instructionOffset,
int stackIndex)
public boolean isStackEntriesPresentBefore(int instructionOffset,
int stackIndex1,
int stackIndex2)
public boolean isStackEntryPresentBefore(int instructionOffset,
int stackIndex)
instructionOffset - the offset of the stack entry to be checked.stackIndex - the index of the stack entry to be checked
(counting from the bottom).public boolean isStackEntriesNecessaryAfter(int instructionOffset,
int stackIndex1,
int stackIndex2)
public boolean isAnyStackEntryNecessaryAfter(proguard.evaluation.value.InstructionOffsetValue instructionOffsets,
int stackIndex)
instructionOffsets - the offsets of the stack entries to be checked.stackIndex - the index of the stack entries to be checked
(counting from the bottom).public boolean isStackEntryNecessaryAfter(int instructionOffset,
int stackIndex)
instructionOffset - the offset of the stack entry to be checked.stackIndex - the index of the stack entry to be checked
(counting from the bottom).public proguard.evaluation.value.InstructionOffsetValue branchTargets(int instructionOffset)
public void visitAnyAttribute(proguard.classfile.Clazz clazz,
proguard.classfile.attribute.Attribute attribute)
visitAnyAttribute in interface proguard.classfile.attribute.visitor.AttributeVisitorpublic void visitCodeAttribute(proguard.classfile.Clazz clazz,
proguard.classfile.Method method,
proguard.classfile.attribute.CodeAttribute codeAttribute)
visitCodeAttribute in interface proguard.classfile.attribute.visitor.AttributeVisitorpublic void visitCodeAttribute0(proguard.classfile.Clazz clazz,
proguard.classfile.Method method,
proguard.classfile.attribute.CodeAttribute codeAttribute)