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 TypeMethodDescriptionvoidgenerateDeclCode(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 therunmethod.voidgenerateInitCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.voidgenerateLoadCode(JitCodeGenerator gen, JitType type, TypeConversions.Ext ext, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.voidgenerateStoreCode(JitCodeGenerator gen, JitType type, TypeConversions.Ext ext, 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 therunmethod.- 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
void generateLoadCode(JitCodeGenerator gen, JitType type, TypeConversions.Ext ext, org.objectweb.asm.MethodVisitor rv) 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 bytecodeext- the kind of extension to apply when adjusting from JVM size to varnode sizerv- the visitor for therunmethod
-
generateStoreCode
void generateStoreCode(JitCodeGenerator gen, JitType type, TypeConversions.Ext ext, org.objectweb.asm.MethodVisitor rv) 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 bytecodeext- the kind of extension to apply when adjusting from varnode size to JVM sizerv- the visitor for therunmethod
-