Package ghidra.pcode.emu.jit.analysis
Record Class JitAllocationModel.JvmLocal
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.analysis.JitAllocationModel.JvmLocal
- Record Components:
index- the index reserved for this localname- the human-readable name for this localtype- a type for this localvn- the varnode whose value this local holds
- Enclosing class:
JitAllocationModel
public static record JitAllocationModel.JvmLocal(int index, String name, JitType.SimpleJitType type, Varnode vn)
extends Record
An allocated JVM local
-
Constructor Summary
ConstructorsConstructorDescriptionJvmLocal(int index, String name, JitType.SimpleJitType type, Varnode vn) Creates an instance of aJvmLocalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidgenerateBirthCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor rv) Emit bytecode to bring this varnode into scope.voidgenerateDeclCode(JitCodeGenerator gen, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.MethodVisitor rv) Emit bytecode at the top of therunmethod.voidgenerateInitCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.voidgenerateLoadCode(org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.voidgenerateRetireCode(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor rv) Emit bytecode to take this varnode out of scope.voidgenerateStoreCode(org.objectweb.asm.MethodVisitor rv) Emit bytecode to store the value on the JVM stack into the varnode.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.vn()Returns the value of thevnrecord component.
-
Constructor Details
-
Method Details
-
generateInitCode
Emit bytecode into the class constructor.- 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) Emit bytecode at the top of therunmethod.This will declare all of the allocated locals for the entirety of the method.
- 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(org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.- Parameters:
rv- the visitor for therunmethod
-
generateStoreCode
public void generateStoreCode(org.objectweb.asm.MethodVisitor rv) Emit bytecode to store the value on the JVM stack into the varnode.- Parameters:
rv- the visitor for therunmethod
-
generateBirthCode
Emit bytecode to bring this varnode into scope.This will copy the value from the
stateinto the local variable.- Parameters:
gen- the code generatorrv- the visitor for therunmethod
-
generateRetireCode
Emit bytecode to take this varnode out of scope.This will copy the value from the local variable into the
state.- Parameters:
gen- the code generatorrv- the visitor for theJitCompiledPassage.run(int)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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
vn
Returns the value of thevnrecord component.- Returns:
- the value of the
vnrecord component
-