Package ghidra.pcode.emu.jit.analysis
Interface JitAllocationModel.VarHandler
- All Known Subinterfaces:
JitAllocationModel.OneLocalVarHandler
- All Known Implementing Classes:
JitAllocationModel.DoubleVarAlloc
,JitAllocationModel.FloatVarAlloc
,JitAllocationModel.IntVarAlloc
,JitAllocationModel.LongVarAlloc
,JitAllocationModel.MultiLocalVarHandler
,JitAllocationModel.NoHandler
- Enclosing class:
JitAllocationModel
public static interface JitAllocationModel.VarHandler
A handler that knows how to load and store variable values onto and from the JVM stack.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generateDeclCode
(JitCodeGenerator gen, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.MethodVisitor rv) If needed, emit bytecode at the top of therun
method.void
generateInitCode
(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.void
generateLoadCode
(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.void
generateStoreCode
(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.type()
Get the p-code type of the variable this handler handles.
-
Method Details
-
type
JitType type()Get the p-code type of the variable this handler handles.- Returns:
- the type
-
generateInitCode
Emit bytecode into the class constructor.- Parameters:
gen
- the code generatoriv
- the visitor for the class constructor
-
generateDeclCode
void generateDeclCode(JitCodeGenerator gen, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.MethodVisitor rv) If needed, emit bytecode at the top of therun
method.- Parameters:
gen
- the code generatorstart
- a label at the top of the methodend
- a label at the end of the methodrv
- the visitor for the run method
-
generateLoadCode
Emit bytecode to load the varnode's value onto the JVM stack.- Parameters:
gen
- the code generatortype
- the p-code type of the value expected on the JVM stack by the proceeding bytecoderv
- the visitor for therun
method
-
generateStoreCode
Emit bytecode to load the varnode's value onto the JVM stack.- Parameters:
gen
- the code generatortype
- the p-code type of the value produced on the JVM stack by the preceding bytecoderv
- the visitor for therun
method
-