Class CMasterOptimizer
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer<ICMethod>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.CMasterOptimizer
- All Implemented Interfaces:
ICMasterOptimizer
,IMasterOptimizer<ICMethod>
public class CMasterOptimizer
extends AbstractMasterOptimizer<ICMethod>
implements ICMasterOptimizer
Master optimizer for the C AST generated code.
Information about how groups of optimizers are scheduled for execution can be found in the
IMasterOptimizer
javadoc.
-
Field Summary
FieldsFields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
decryptorSupport, enableDeobfuscators, enableUnsafeOptimizers, grp1NMaxRunCount, instrumenters, optGrpMap, optList, t
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer
DEFAULT_GROUP
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a standard AST master optimizer with no maximum runcount (unsafe).CMasterOptimizer
(ICMethod m, int grp1NMaxRunCount) Create a standard AST master optimizer. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getTargetAddress
(ICMethod target) protected boolean
onOptimizerException
(ICMethod target, IOptimizer<ICMethod> opt, Exception ex) This method is called when an optimizer hard-failed and generated an exception.protected void
This method might be overridden, but the parent should be called first.protected void
postOptimizationCallback
(ICMethod m, OptimizerEntry<ICMethod> e, int cnt, long executionTimeMs) This method might be overridden, but the parent should be called first.Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
getDecryptorSupport, getMode, getOptimizationCount, getOptimizer, getOptimizerObject, getRegisteredOptimizers, getRegisteredOptimizers, getTarget, getTotalOptimizationCount, isEnableDeobfuscators, isEnableUnsafeOptimizers, perform, performMultiple, performSingle, performV1, performV2, preAllOptimizationsCallback, preOptimizationCallback, registerInstrumenter, registerOptimizer, registerOptimizer, retrievePerformanceCounters, setDecryptorSupport, setEnableDeobfuscators, setEnableUnsafeOptimizers, setMode, setPolicyForOptimizerTag, setTarget, unregisterAllOptimizers, unregisterInstrumenter, unregisterOptimizer
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.IMasterOptimizer
getMode, getOptimizationCount, getOptimizer, getOptimizerObject, getRegisteredOptimizers, getRegisteredOptimizers, getTarget, getTotalOptimizationCount, perform, performMultiple, performSingle, registerInstrumenter, registerOptimizer, registerOptimizer, setMode, setPolicyForOptimizerTag, setTarget, unregisterInstrumenter, unregisterOptimizer
-
Field Details
-
EMPTY
-
defaultMaxRunCount
public static int defaultMaxRunCountno max
-
-
Constructor Details
-
CMasterOptimizer
Create a standard AST master optimizer with no maximum runcount (unsafe).- Parameters:
m
- optional default method; the target method may be set after construction usingAbstractMasterOptimizer.setTarget(ICRoutineContext)
-
CMasterOptimizer
Create a standard AST master optimizer.- Parameters:
m
- optional default method; the target method may be set after construction usingAbstractMasterOptimizer.setTarget(ICRoutineContext)
grp1NMaxRunCount
- maximum run count for the group [1..N]
-
-
Method Details
-
postOptimizationCallback
protected void postOptimizationCallback(ICMethod m, OptimizerEntry<ICMethod> e, int cnt, long executionTimeMs) Description copied from class:AbstractMasterOptimizer
This method might be overridden, but the parent should be called first. Note that this method might have a big impact on decompilation performance, so override carefully.- Overrides:
postOptimizationCallback
in classAbstractMasterOptimizer<ICMethod>
-
postAllOptimizationsCallback
Description copied from class:AbstractMasterOptimizer
This method might be overridden, but the parent should be called first.- Overrides:
postAllOptimizationsCallback
in classAbstractMasterOptimizer<ICMethod>
-
onOptimizerException
Description copied from class:AbstractMasterOptimizer
This method is called when an optimizer hard-failed and generated an exception.- Overrides:
onOptimizerException
in classAbstractMasterOptimizer<ICMethod>
- Parameters:
target
- the target that being optimizedopt
- the failing optimizerex
- the generated exception- Returns:
- if true, the exception will be neutered and the master optimizer will resume the optimizing process; else, the exception will be thrown
-
getTargetAddress
- Specified by:
getTargetAddress
in classAbstractMasterOptimizer<ICMethod>
-