Module org.kink_lang.kink
Class FastLvarAccessGenerator
java.lang.Object
org.kink_lang.kink.internal.compile.javaclassir.FastLvarAccessGenerator
- All Implemented Interfaces:
LvarAccessGenerator
Generates insns of loval vars in a ssa fun.
-
Constructor Summary
ConstructorDescriptionFastLvarAccessGenerator
(AllocationSet allocationSet, KeyStrSupplier keySup, TraceAccumulator traceAccum) Constructs a generator. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whetherlvar
is unused.Generates insns to load a local var, checking absence.loadLvarAllowNull
(LocalVar lvar) Generates insns to load a local var, not checking absence.Generates insns to pass the specified arg.Generates insns to pass the recv.Generates insns to store a local var.
-
Constructor Details
-
FastLvarAccessGenerator
public FastLvarAccessGenerator(AllocationSet allocationSet, KeyStrSupplier keySup, TraceAccumulator traceAccum) Constructs a generator.- Parameters:
allocationSet
- the allocation analysis of local vars.keySup
- the supplier of key strs.traceAccum
- trace accumulator.
-
-
Method Details
-
loadLvar
Description copied from interface:LvarAccessGenerator
Generates insns to load a local var, checking absence.- Specified by:
loadLvar
in interfaceLvarAccessGenerator
- Parameters:
lvar
- the local var.loc
- the location of the dereference.- Returns:
- insns to load a local var.
-
loadLvarAllowNull
Description copied from interface:LvarAccessGenerator
Generates insns to load a local var, not checking absence.- Specified by:
loadLvarAllowNull
in interfaceLvarAccessGenerator
- Parameters:
lvar
- the local var.- Returns:
- insns to load a local var.
-
storeLvar
Description copied from interface:LvarAccessGenerator
Generates insns to store a local var.- Specified by:
storeLvar
in interfaceLvarAccessGenerator
- Parameters:
lvar
- the local var.- Returns:
- insns to store a local var.
-
passRecv
Description copied from interface:LvarAccessGenerator
Generates insns to pass the recv.- Specified by:
passRecv
in interfaceLvarAccessGenerator
- Parameters:
lvar
- the local var.- Returns:
- insns to pass recv.
-
passArg
Description copied from interface:LvarAccessGenerator
Generates insns to pass the specified arg.- Specified by:
passArg
in interfaceLvarAccessGenerator
- Parameters:
lvar
- the local var.argIndex
- the index of the arg.- Returns:
- insns to pass arg.
-
isUnused
Description copied from interface:LvarAccessGenerator
Returns whetherlvar
is unused.- Specified by:
isUnused
in interfaceLvarAccessGenerator
- Parameters:
lvar
- local var to test.- Returns:
- whether lvar is unused.
-