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 aMultiLocalVarHandler
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.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.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.final int
hashCode()
Returns a hash code value for this object.parts()
Returns the value of theparts
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
Method Details
-
generateInitCode
Description copied from interface:JitAllocationModel.VarHandler
Emit bytecode into the class constructor.- Specified by:
generateInitCode
in 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.VarHandler
If needed, emit bytecode at the top of therun
method.- Specified by:
generateDeclCode
in 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.VarHandler
Emit bytecode to load the varnode's value onto the JVM stack.- Specified by:
generateLoadCode
in 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 therun
method
-
generateStoreCode
public void generateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Description copied from interface:JitAllocationModel.VarHandler
Emit bytecode to load the varnode's value onto the JVM stack.- Specified by:
generateStoreCode
in 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 therun
method
-
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 theparts
record component.- Returns:
- the value of the
parts
record component
-
type
Returns the value of thetype
record component.- Specified by:
type
in interfaceJitAllocationModel.VarHandler
- Returns:
- the value of the
type
record component
-