Package ghidra.pcode.emu.jit.analysis
Record Class JitAllocationModel.MultiLocalVarHandler
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.analysis.JitAllocationModel.MultiLocalVarHandler
- Record Components:
parts- the parts describing how the locals are composedtype- the p-code type of the (whole) variable
- All Implemented Interfaces:
JitAllocationModel.VarHandler
- Enclosing class:
JitAllocationModel
public static record JitAllocationModel.MultiLocalVarHandler(List<JitAllocationModel.MultiLocalPart> parts, JitType type)
extends Record
implements JitAllocationModel.VarHandler
The handler for a variable allocated in a composition of locals
This can also handle a varnode that is a subpiece of a local variable allocated for a larger
varnode. For example, this may handle EAX, when we have allocated a long to
hold all of RAX.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLocalVarHandler(List<JitAllocationModel.MultiLocalPart> parts, JitType type) Creates an instance of aMultiLocalVarHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.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.voidgenerateInitCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.voidgenerateLoadCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.voidgenerateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.final inthashCode()Returns a hash code value for this object.parts()Returns the value of thepartsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
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
public 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
public 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
public 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
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceJitAllocationModel.VarHandler- Returns:
- the value of the
typerecord component
-