Package ghidra.pcode.emu.jit.analysis
Interface JitAllocationModel.OneLocalVarHandler
- All Superinterfaces:
JitAllocationModel.VarHandler
- All Known Implementing Classes:
JitAllocationModel.DoubleVarAlloc,JitAllocationModel.FloatVarAlloc,JitAllocationModel.IntVarAlloc,JitAllocationModel.LongVarAlloc
- Enclosing class:
JitAllocationModel
A handler for p-code variables composed of a single JVM local variable.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidgenerateDeclCode(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.default voidgenerateInitCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.default voidgenerateLoadCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.default voidgenerateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.local()Get the local variable into which this p-code variable is allocatedMethods inherited from interface ghidra.pcode.emu.jit.analysis.JitAllocationModel.VarHandler
type
-
Method Details
-
local
JitAllocationModel.JvmLocal local()Get the local variable into which this p-code variable is allocated- Returns:
- the local
-
generateInitCode
Description copied from interface:JitAllocationModel.VarHandlerEmit bytecode into the class constructor.- Specified by:
generateInitCodein interfaceJitAllocationModel.VarHandler- Parameters:
gen- the code generatoriv- the visitor for the class constructor
-
generateDeclCode
default void generateDeclCode(JitCodeGenerator gen, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.MethodVisitor rv) Description copied from interface:JitAllocationModel.VarHandlerIf needed, emit bytecode at the top of therunmethod.- Specified by:
generateDeclCodein interfaceJitAllocationModel.VarHandler- 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
default void generateLoadCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Description copied from interface:JitAllocationModel.VarHandlerEmit bytecode to load the varnode's value onto the JVM stack.- Specified by:
generateLoadCodein interfaceJitAllocationModel.VarHandler- Parameters:
gen- the code generatortype- the p-code type of the value expected on the JVM stack by the proceeding bytecoderv- the visitor for therunmethod
-
generateStoreCode
default void generateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Description copied from interface:JitAllocationModel.VarHandlerEmit bytecode to load the varnode's value onto the JVM stack.- Specified by:
generateStoreCodein interfaceJitAllocationModel.VarHandler- Parameters:
gen- the code generatortype- the p-code type of the value produced on the JVM stack by the preceding bytecoderv- the visitor for therunmethod
-