public abstract class

AbstractCBlockOptimizer

extends AbstractCOptimizer
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.AbstractPlugin
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer<T>
       ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
         ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
Known Direct Subclasses

Class Overview

Perform a recursive optimizer on CBlock. The policy is recurse first, so optimizer is done as post-treatment.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
Public Constructors
AbstractCBlockOptimizer()
Public Methods
final int performOnMethoBlocksRecursivively()
Protected Methods
ICStatement getNextSiblingStatement(int statementIndex, ICBlock block, ICStatement blockNextSiblingStm)
abstract int optimizeBlock(ICBlock b)
Attempt to optimize CBlock.
int optimizeBlock(ICBlock b, ICCompound parent, ICStatement blockNextStm)
Attempt to optimize CBlock, with some contextual information provided.
int performInternal()
Can be overridden.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
From class com.pnfsoftware.jeb.core.AbstractPlugin
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.IPlugin
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer

Public Constructors

public AbstractCBlockOptimizer ()

Public Methods

public final int performOnMethoBlocksRecursivively ()

Protected Methods

protected ICStatement getNextSiblingStatement (int statementIndex, ICBlock block, ICStatement blockNextSiblingStm)

protected abstract int optimizeBlock (ICBlock b)

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

protected int optimizeBlock (ICBlock b, ICCompound parent, ICStatement blockNextStm)

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
parent the parent compound statement
blockNextStm the next statement (i.e. the next sibling statement in the AST, not control-flow related)

protected int performInternal ()

Can be overridden. The default implementation simply calls performOnMethoBlocksRecursivively().