java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternCompiler

public class EPatternCompiler extends Object
IR expression pattern compiler. (Do not confuse this class with the IR compiler!)

This compiler takes a pattern as a string and compiles it to a pattern. A pattern is essentially is a template tree.

Rules: see EPatternCompiler.EPattern.

  • Field Details

    • FLAG_NO_VARIABLE_LEAF_OVERLAP

      public static final int FLAG_NO_VARIABLE_LEAF_OVERLAP
      This flag is used to indicate that input patterns leaves matching EVar should not map to overlapped IR elements.

      Example:

       Pattern: V0 = V1
       IR:      r5 = r5
       
      If this flag is specified, the pattern will not match on the IR since leaves ids 0 and 1 would map to the same underlying IR EVar r5.
      See Also:
    • FLAG_SAME_BITSIZE_FOR_LEAVES

      public static final int FLAG_SAME_BITSIZE_FOR_LEAVES
      This flag indicates that all leaves in the input pattern must have the same bitsize.

      If some leaves in the pattern have specified (required) bitsizes, then those bitsizes must be the same and other leaves with unspecified bitsizes must have that same bitsize as well, else matching will fail.

      See Also:
    • FLAG_INVALIDATE_DFA

      public static final int FLAG_INVALIDATE_DFA
      This client-side flag indicates that a successfully generated output (replacing a matched input) should be followed by the invalidation of all data-flow analysis.

      This flag is not honored by the matcher. It is up to the client to take action and honor this flag on a successful matching.

      See Also:
    • DEFAULT_COMPILER

      public static final EPatternCompiler DEFAULT_COMPILER
      A static pattern compiler using default settings (no flags).
  • Constructor Details

    • EPatternCompiler

      public EPatternCompiler(int flags)
      Create a pattern compiler.
      Parameters:
      flags - compiler flags
    • EPatternCompiler

      public EPatternCompiler()
      Create a pattern compiler using default settings.
  • Method Details