public class

CMasterOptimizer

extends AbstractMasterOptimizer<T extends IOptimizerTarget>
implements ICMasterOptimizer
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer<T extends com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizerTarget>
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.CMasterOptimizer

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer
Fields
public static final CMasterOptimizer EMPTY
public static int defaultMaxRunCount no max
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
Public Constructors
CMasterOptimizer(ICMethod m)
Create a standard AST master optimizer with no maximum runcount (unsafe).
CMasterOptimizer(ICMethod m, int grp1NMaxRunCount)
Create a standard AST master optimizer.
Protected Methods
String getTargetAddress(ICMethod target)
boolean onOptimizerException(ICMethod target, IOptimizer<ICMethod> opt, Exception ex)
This method is called when an optimizer hard-failed and generated an exception.
void postAllOptimizationsCallback(ICMethod m)
This method might be overridden, but the parent should be called first.
void postOptimizationCallback(ICMethod m, OptimizerEntry<ICMethod> e, int cnt, long executionTimeMs)
This method might be overridden, but the parent should be called first.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer

Fields

public static final CMasterOptimizer EMPTY

public static int defaultMaxRunCount

no max

Public Constructors

public CMasterOptimizer (ICMethod m)

Create a standard AST master optimizer with no maximum runcount (unsafe).

Parameters
m optional default method; the target method may be set after construction using #setTarget(ICRoutineContext)

public CMasterOptimizer (ICMethod m, int grp1NMaxRunCount)

Create a standard AST master optimizer.

Parameters
m optional default method; the target method may be set after construction using #setTarget(ICRoutineContext)
grp1NMaxRunCount maximum run count for the group [1..N]

Protected Methods

protected 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.

Parameters
target the target that being optimized
opt the failing optimizer
ex 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

protected void postAllOptimizationsCallback (ICMethod m)

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. Note that this method might have a big impact on decompilation performance, so override carefully.