Package ghidra.pcode.emu.jit.analysis
Record Class JitAllocationModel.MultiLocalPart
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.analysis.JitAllocationModel.MultiLocalPart
- Record Components:
- local- the local variable allocated to this part
- shift- the number of bytes and direction to shift
- Enclosing class:
- JitAllocationModel
public static record JitAllocationModel.MultiLocalPart(JitAllocationModel.JvmLocal local, int shift)
extends Record
A portion of a multi-local variable handler.
 
 
This portion is allocated in a JVM local. When loading with a positive shift, the value is shifted to the right to place it into position.
- 
Constructor SummaryConstructorsConstructorDescriptionMultiLocalPart(JitAllocationModel.JvmLocal local, int shift) Creates an instance of aMultiLocalPartrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidgenerateLoadCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the value from this local and position it in a value on the JVM stack.voidgenerateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to extract this part from the value on the JVM stack and store it in the local variable.final inthashCode()Returns a hash code value for this object.local()Returns the value of thelocalrecord component.intshift()Returns the value of theshiftrecord component.final StringtoString()Returns a string representation of this record class.
- 
Constructor Details
- 
Method Details- 
generateLoadCodepublic void generateLoadCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the value from this local and position it in a value on the JVM stack.If multiple parts are to be combined, the caller should emit a bitwise or after all loads but the first. - Parameters:
- gen- the code generator
- type- the p-code type of the value expected on the stack by the proceeding bytecode, which may be to load additional parts
- rv- the visitor for the- runmethod
- Implementation Notes:
- We must keep temporary values in a variable of the larger of the local's or the expected type, otherwise bits may get dropped while positioning the value.
 
- 
generateStoreCodepublic void generateStoreCode(JitCodeGenerator gen, JitType type, org.objectweb.asm.MethodVisitor rv) Emit bytecode to extract this part from the value on the JVM stack and store it in the local variable.If multiple parts are to be stored, the caller should emit a dupordup2before all stores but the last.- Parameters:
- gen- the code generator
- type- the p-code type of the value expected on the stack by the proceeding bytecode, which may be to load additional parts
- rv- the visitor for the- runmethod
- Implementation Notes:
- We must keep temporary values in a variable of the larger of the local's or the expected type, otherwise bits may get dropped while positioning the value.
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
localReturns the value of thelocalrecord component.- Returns:
- the value of the localrecord component
 
- 
shiftpublic int shift()Returns the value of theshiftrecord component.- Returns:
- the value of the shiftrecord component
 
 
-