Package ghidra.pcode.emu.jit.gen.var
Enum Class ConstValGen
- All Implemented Interfaces:
ValGen<JitConstVal>
,Serializable
,Comparable<ConstValGen>
,Constable
The generator for a constant value.
This can load directly the requested constant as the required JVM type onto the JVM stack. It
simply emits an ldc
bytecode.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateValInitCode
(JitCodeGenerator gen, JitConstVal v, org.objectweb.asm.MethodVisitor iv) Prepare any class-level items required to use this variablegenerateValReadCode
(JitCodeGenerator gen, JitConstVal v, JitTypeBehavior typeReq, org.objectweb.asm.MethodVisitor rv) Read the value onto the stackstatic ConstValGen
Returns the enum constant of this class with the specified name.static ConstValGen[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GEN
Singleton
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
generateValInitCode
public void generateValInitCode(JitCodeGenerator gen, JitConstVal v, org.objectweb.asm.MethodVisitor iv) Description copied from interface:ValGen
Prepare any class-level items required to use this variableFor example, if this represents a direct memory variable, then this can prepare a reference to the portion of the state involved, allowing it to access it readily.
- Specified by:
generateValInitCode
in interfaceValGen<JitConstVal>
- Parameters:
gen
- the code generatorv
- the valueiv
- the constructor visitor
-
generateValReadCode
public JitType generateValReadCode(JitCodeGenerator gen, JitConstVal v, JitTypeBehavior typeReq, org.objectweb.asm.MethodVisitor rv) Description copied from interface:ValGen
Read the value onto the stack- Specified by:
generateValReadCode
in interfaceValGen<JitConstVal>
- Parameters:
gen
- the code generatorv
- the value to readtypeReq
- the required type of the valuerv
- the visitor for therun
method- Returns:
- the actual p-code type (which determines the JVM type) of the value on the stack
-