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 aJvmLocal
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
generateBirthCode
(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor rv) Emit bytecode to bring this varnode into scope.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 therun
method.void
generateInitCode
(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor iv) Emit bytecode into the class constructor.void
generateLoadCode
(org.objectweb.asm.MethodVisitor rv) Emit bytecode to load the varnode's value onto the JVM stack.void
generateRetireCode
(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor rv) Emit bytecode to take this varnode out of scope.void
generateStoreCode
(org.objectweb.asm.MethodVisitor rv) Emit bytecode to store the value on the JVM stack into the varnode.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.vn()
Returns the value of thevn
record 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 therun
method.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 therun
method
-
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 therun
method
-
generateBirthCode
Emit bytecode to bring this varnode into scope.This will copy the value from the
state
into the local variable.- Parameters:
gen
- the code generatorrv
- the visitor for therun
method
-
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 theindex
record component.- Returns:
- the value of the
index
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
vn
Returns the value of thevn
record component.- Returns:
- the value of the
vn
record component
-