Class AbstractCElementOptimizer
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
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCElementOptimizer
- All Implemented Interfaces:
IPlugin,ICOptimizer,IOptimizer<ICMethod>
Specialized base optimizer for C elements. Each element contained in the AST method is provided
to
optimizeElement(ICElement, ICElement)
Implementation note: the elements in the AST method tree are processed in a post-visit fashion.
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
cf, ef, g, m, ofFields 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
ConstructorsConstructorDescriptionSame asthis(false).AbstractCElementOptimizer(boolean innerReplacement) Create an element optimizer. -
Method Summary
Modifier and TypeMethodDescriptionprotected final intProcess the block.protected abstract ICElementoptimizeElement(ICElement e, ICElement parent) Optimize an element.Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
getNextSiblingStatement, optimizeBlock, perform, performOnMethoBlocksRecursivivelyMethods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
getMasterOptimizer, getMasterOptimizerSafe, performOnTargetMethods 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, setTypeMethods inherited from class com.pnfsoftware.jeb.core.AbstractPlugin
dispose, getData, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, setMasterOptimizerMethods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Constructor Details
-
AbstractCElementOptimizer
public AbstractCElementOptimizer()Same asthis(false). -
AbstractCElementOptimizer
public AbstractCElementOptimizer(boolean innerReplacement) Create an element optimizer.- Parameters:
innerReplacement- if false,parent.replaceSubElement(elt, new_elt)will be called after a successful optimization (optimizeElement(ICElement, ICElement)returned non-null)
-
-
Method Details
-
optimizeBlock
Process the block. Sub-classes should not override the default implementation.- Specified by:
optimizeBlockin classAbstractCBlockOptimizer- Parameters:
b- a block of statements- Returns:
- the number of optimizations done
-
optimizeElement
Optimize an element. Sub-classes must implement this method- Parameters:
e- input element to be optimizedparent- the parent of the input element- Returns:
- non-null if the element was optimized; null means it was not optimized (if
innerReplacement=truewas provided to the constructor, this return value, if non-null, must be the input element itself)
-