public class BranchLeaveMatching
extends java.lang.Object
| Constructor and Description |
|---|
BranchLeaveMatching() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
compatibleExitInstruction(@Nullable Instruction exit1,
@Nullable Instruction exit2)
Returns true if exit1 and exit2 are both exit instructions
(branch or leave) and both represent the same exit.
|
static @Nullable Branch |
matchBranch(@Nullable Instruction insn)
Attempts to match a branch instruction.
|
static @Nullable Branch |
matchBranch(@Nullable Instruction insn,
Block targetBlock)
Attempts to match a branch instruction to a given block.
|
static @Nullable Leave |
matchLeave(@Nullable Instruction insn)
Attempts to match a leave instruction.
|
static @Nullable Leave |
matchLeave(@Nullable Instruction insn,
BlockContainer container)
Attempts to match a leave instruction which leaves the specified BlockContainer.
|
static @Nullable Return |
matchReturn(@Nullable Instruction insn)
Attempts to match a
Return instruction that is exiting a function. |
static @Nullable Return |
matchReturn(@Nullable Instruction insn,
MethodDecl method) |
static @Nullable Throw |
matchThrow(@Nullable Instruction insn)
Attempts to match a
Throw instruction. |
static @Nullable Throw |
matchThrow(@Nullable Instruction insn,
LocalVariable variable)
Attempts to match a
Throw instruction, which loads
the specified variable. |
@Nullable public static @Nullable Return matchReturn(@Nullable @Nullable Instruction insn)
Return instruction that is exiting a function.insn - The instruction.Return instruction, otherwise null.@Nullable public static @Nullable Return matchReturn(@Nullable @Nullable Instruction insn, MethodDecl method)
@Nullable public static @Nullable Leave matchLeave(@Nullable @Nullable Instruction insn)
insn - The instruction.@Nullable public static @Nullable Leave matchLeave(@Nullable @Nullable Instruction insn, BlockContainer container)
insn - The instruction.container - The BlockContainer.@Nullable public static @Nullable Branch matchBranch(@Nullable @Nullable Instruction insn)
insn - The instruction.@Nullable public static @Nullable Branch matchBranch(@Nullable @Nullable Instruction insn, Block targetBlock)
insn - The instruction.targetBlock - The target block.public static boolean compatibleExitInstruction(@Nullable
@Nullable Instruction exit1,
@Nullable
@Nullable Instruction exit2)
exit1 - The first exit point.exit2 - The second exit point.@Nullable public static @Nullable Throw matchThrow(@Nullable @Nullable Instruction insn)
Throw instruction.insn - The Instruction.Throw or null.@Nullable public static @Nullable Throw matchThrow(@Nullable @Nullable Instruction insn, LocalVariable variable)
Throw instruction, which loads
the specified variable.insn - The Instruction.variable - The variable.Throw or null.