Package ghidra.pcode.emu.jit.analysis
Interface JitAllocationModel.FixedLocal
- All Known Implementing Classes:
JitAllocationModel.InitFixedLocal
,JitAllocationModel.RunFixedLocal
- Enclosing class:
JitAllocationModel
public static interface JitAllocationModel.FixedLocal
A local that is always allocated in its respective method
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
generateDeclCode
(org.objectweb.asm.MethodVisitor mv, String nameThis, org.objectweb.asm.Label startLocals, org.objectweb.asm.Label endLocals) Generate the declaration of this variable.default void
generateLoadCode
(org.objectweb.asm.MethodVisitor mv) Generate a load of this variable onto the JVM stack.default void
generateStoreCode
(org.objectweb.asm.MethodVisitor mv) Generate a store to this variable from the JVM stack.int
index()
The JVM index of the localint
The JVM opcode used to load the variableint
The JVM opcode used to store the variableA JVM type descriptor for the localvarName()
The name of the local
-
Method Details
-
index
int index()The JVM index of the local- Returns:
- the index
-
varName
String varName()The name of the local- Returns:
- the name
-
typeDesc
A JVM type descriptor for the local- Parameters:
nameThis
- the name of this class, in case it's the this pointer.- Returns:
- the type descriptor
-
opcodeLoad
int opcodeLoad()The JVM opcode used to load the variable- Returns:
- the load opcode
-
opcodeStore
int opcodeStore()The JVM opcode used to store the variable- Returns:
- the store opcode
-
generateDeclCode
default void generateDeclCode(org.objectweb.asm.MethodVisitor mv, String nameThis, org.objectweb.asm.Label startLocals, org.objectweb.asm.Label endLocals) Generate the declaration of this variable.This is not required, but is nice to have when debugging generated code.
- Parameters:
mv
- the method visitornameThis
- the name of the class defining the containing methodstartLocals
- the start label which should be placed at the top of the methodendLocals
- the end label which should be placed at the bottom of the method
-
generateLoadCode
default void generateLoadCode(org.objectweb.asm.MethodVisitor mv) Generate a load of this variable onto the JVM stack.- Parameters:
mv
- the method visitor
-
generateStoreCode
default void generateStoreCode(org.objectweb.asm.MethodVisitor mv) Generate a store to this variable from the JVM stack.- Parameters:
mv
- the method visitor
-