java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternCompiler |
IR expression pattern compiler. (Do not confuse this class with the IR compiler.)
Can compile, match and optionally replace full list statements or pure expressions.
Rules: see EPatternCompiler.EPattern
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | EPatternCompiler.EPattern | IR expression multi-pattern, consisting of one or more inputs, and zero or one output (for replacement). |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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. | |||||||||
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. | |||||||||
int | FLAG_SAME_BITSIZE_FOR_LEAVES | This flag indicates that all leaves in the input pattern must have the same bitsize. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final EPatternCompiler | DEFAULT_COMPILER | A static pattern compiler using default settings (no flags). |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EPatternCompiler(int flags)
Create a pattern compiler.
| |||||||||||
EPatternCompiler()
Create a pattern compiler using default settings.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EPatternCompiler.EPattern |
compile(EPatternCompiler.EPattern pattern)
Compile an IR pattern.
| ||||||||||
int | getFlags() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
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 = r5If 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.
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.
A static pattern compiler using default settings (no flags).
Create a pattern compiler.
flags | compiler flags |
---|
Create a pattern compiler using default settings.
Compile an IR pattern.
pattern | a non-compiled pattern; attempting to compile an already-compiled pattern will raise an IllegalStateException |
---|