Class Leaf
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.Leaf
- All Implemented Interfaces:
INode
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').
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
int
type of allowed leaf; must be set, because the default value (0) means noneint
internal id assigned to this leaf; must be >= 0int
optional requested size of the leaf; leave to 0 for any size.for Leaf representingIEImm
. -
Constructor Summary
ConstructorsConstructorDescriptionLeaf
(int id, int bitsize, int flags) Create a wildcard leaf.Leaf
(int id, int bitsize, int flags, INodeHandler handler) Create a wildcard leaf.Leaf
(long value, int bitsize, int id) Create a fixed, pre-determined immediate constant leaf. -
Method Summary
-
Field Details
-
FLAG_POSSIBLE_IMM
public static final int FLAG_POSSIBLE_IMM- See Also:
-
FLAG_POSSIBLE_VAR
public static final int FLAG_POSSIBLE_VAR- See Also:
-
FLAG_POSSIBLE_RANGE
public static final int FLAG_POSSIBLE_RANGE- See Also:
-
FLAG_POSSIBLE_NON_TERMINAL
public static final int FLAG_POSSIBLE_NON_TERMINAL- See Also:
-
FLAG_POSSIBLE_TERMINAL
public static final int FLAG_POSSIBLE_TERMINAL- See Also:
-
FLAG_POSSIBLE_ALL
public static final int FLAG_POSSIBLE_ALL- See Also:
-
id
public int idinternal id assigned to this leaf; must be >= 0 -
optionalBitsize
public int optionalBitsizeoptional requested size of the leaf; leave to 0 for any size. -
flags
public int flagstype of allowed leaf; must be set, because the default value (0) means none -
handler
-
value
for Leaf representingIEImm
.
-
-
Constructor Details
-
Leaf
Create a wildcard leaf. Can be a terminal (eg, EVar, EImm) or non-terminal (eg, complex expression).Gotcha: When using
FLAG_LASTBIT_IMM
, theid
refers to the target expression to be examined.- Parameters:
id
- a value in [0,1000[bitsize
-flags
-handler
- custom optional handler to do custom processing (custom checks) on a matched node
-
Leaf
public Leaf(int id, int bitsize, int flags) Create a wildcard leaf. Can be a terminal (eg, EVar, EImm) or non-terminal (eg, complex expression).- Parameters:
id
- a value in [0,1000[bitsize
-flags
-
-
Leaf
public Leaf(long value, int bitsize, int id) Create a fixed, pre-determined immediate constant leaf.- Parameters:
value
- mandatory immediate valuebitsize
- optional, use 0 if unknownid
- 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
-
-
Method Details