public class Inlining extends java.lang.Object implements StatementTransformer
Created by coves1624 on 20/4/21.
| Constructor and Description |
|---|
Inlining() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canInlineIfRequired(Instruction expr,
java.util.List<java.lang.Runnable> extraInliningTasks,
MethodTransformContext ctx) |
static <T> T |
matchWithPotentialInline(@Nullable Instruction insn,
java.util.List<java.lang.Runnable> extraTransforms,
MethodTransformContext ctx,
java.util.function.Function<Instruction,T> matcher) |
void |
transform(Instruction statement,
StatementTransformContext ctx)
Runs the transform on the statements within a block.
|
public void transform(Instruction statement, StatementTransformContext ctx)
StatementTransformerThis transform may only modify instructions after and including the provided position. The transform will run from over the block backwards.
Instructions prior to the current position must not be modified. It is valid to read such instructions, but not recommended as those have not been transformed yet.
This function is only called on control-flow blocks with unreachable end-points.
This, the last instruction in the block must always have the InstructionFlag.END_POINT_UNREACHABLE flag.
transform in interface StatementTransformerctx - The context.@Nullable
public static <T> T matchWithPotentialInline(@Nullable
@Nullable Instruction insn,
java.util.List<java.lang.Runnable> extraTransforms,
MethodTransformContext ctx,
java.util.function.Function<Instruction,T> matcher)
public static boolean canInlineIfRequired(Instruction expr, java.util.List<java.lang.Runnable> extraInliningTasks, MethodTransformContext ctx)