Class AbstractCBlockOptimizer
java.lang.Object
com.pnfsoftware.jeb.core.AbstractPlugin
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer<ICMethod>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
- All Implemented Interfaces:
IPlugin
,ICOptimizer
,IOptimizer<ICMethod>
- Direct Known Subclasses:
AbstractCElementOptimizer
,AbstractCStatementOptimizer
Perform a recursive optimizer on
ICBlock
. The policy is recurse first, so optimizer is
done as post-treatment.-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
cf, ef, g, m, of
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
logger
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
DEAD_CODE_REMOVER, DEOBFUSCATOR, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_STANDARD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ICStatement
getNextSiblingStatement
(int statementIndex, ICBlock block, ICStatement blockNextSiblingStm) protected abstract int
Attempt to optimize CBlock.protected int
optimizeBlock
(ICBlock b, ICCompound parent, ICStatement blockNextStm) Attempt to optimize CBlock, with some contextual information provided.protected int
perform()
Can be overridden.final int
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
getMasterOptimizer, getMasterOptimizerSafe, performOnTarget
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
addTag, getName, getPluginInformation, getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, removeTag, setMasterOptimizer, setName, setPreferredExecutionStage, setPriority, setRequiredModeThreshold, setType
Methods inherited from class com.pnfsoftware.jeb.core.AbstractPlugin
dispose, getData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, setMasterOptimizer
Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Constructor Details
-
AbstractCBlockOptimizer
public AbstractCBlockOptimizer()
-
-
Method Details
-
perform
protected int perform()Can be overridden. The default implementation simply callsperformOnMethoBlocksRecursivively()
.- Specified by:
perform
in classAbstractCOptimizer
- Returns:
-
performOnMethoBlocksRecursivively
public final int performOnMethoBlocksRecursivively() -
getNextSiblingStatement
protected ICStatement getNextSiblingStatement(int statementIndex, ICBlock block, ICStatement blockNextSiblingStm) -
optimizeBlock
Attempt to optimize CBlock. Sub-expressions may be examined. The implementor should not attempt to modify parent or siblings CBlocks.- Parameters:
b
- CBlock- Returns:
- the number of optimizations done
-
optimizeBlock
Attempt to optimize CBlock, with some contextual information provided. Sub-expressions may be examined. The implementor should not attempt to modify parent or siblings CBlocks.- Parameters:
b
-parent
- the parent compound statementblockNextStm
- the next statement (i.e. the next sibling statement in the AST, not control-flow related)- Returns:
-