java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.Leaf |
IR template element.
A leaf node is never null. Examples: an immediate or variable (atomic leaf, aka 'Terminal leaf') or memory access (composed leaf, aka 'Non-terminal leaf').
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FLAG_POSSIBLE_ALL | ||||||||||
int | FLAG_POSSIBLE_IMM | ||||||||||
int | FLAG_POSSIBLE_NON_TERMINAL | ||||||||||
int | FLAG_POSSIBLE_RANGE | ||||||||||
int | FLAG_POSSIBLE_TERMINAL | ||||||||||
int | FLAG_POSSIBLE_VAR |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public int | flags | type of allowed leaf; must be set, because the default value (0) means none | |||||||||
public INodeHandler | handler | ||||||||||
public int | id | internal id assigned to this leaf; must be >= 0 | |||||||||
public int | optionalBitsize | optional requested size of the leaf; leave to 0 for any size. | |||||||||
public BigInteger | value | for Leaf representing IEImm . |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Leaf(int id, int bitsize, int flags, INodeHandler handler)
Create a wildcard leaf.
| |||||||||||
Leaf(int id, int bitsize, int flags)
Create a wildcard leaf.
| |||||||||||
Leaf(long value, int bitsize, int id)
Create a fixed, pre-determined immediate constant leaf.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Leaf | setHandler(INodeHandler h) | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
type of allowed leaf; must be set, because the default value (0) means none
internal id assigned to this leaf; must be >= 0
optional requested size of the leaf; leave to 0 for any size.
Create a wildcard leaf. Can be a terminal (eg, EVar, EImm) or non-terminal (eg, complex expression).
Gotcha: When using FLAG_LASTBIT_IMM
, the id
refers to the target expression
to be examined.
id | a value in [0,1000[ |
---|---|
handler | custom optional handler to do custom processing (custom checks) on a matched node |
Create a wildcard leaf. Can be a terminal (eg, EVar, EImm) or non-terminal (eg, complex expression).
id | a value in [0,1000[ |
---|
Create a fixed, pre-determined immediate constant leaf.
value | mandatory immediate value |
---|---|
bitsize | optional, use 0 if unknown |
id | optional, use -1 if not needed, else an id in the [0,1000[ range; use if the leaf needs to be used in a subsequent substitution step |