Record Class JitType.IntJitType
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.analysis.JitType.IntJitType
- Record Components:
size- the size in bytes
- All Implemented Interfaces:
JitType, JitType.LeggedJitType<Types.TInt, JitType.IntJitType>, JitType.SimpleJitType<Types.TInt, JitType.IntJitType>
- Enclosing interface:
JitType
public static record JitType.IntJitType(int size)
extends Record
implements JitType.SimpleJitType<Types.TInt, JitType.IntJitType>
The p-code types for integers of size 1 through 4, i.e., that fit in a JVM int.
-
Nested Class Summary
Nested classes/interfaces inherited from interface JitType
JitType.DoubleJitType, JitType.FloatJitType, JitType.IntJitType, JitType.LeggedJitType<T,LT>, JitType.LongJitType, JitType.MpFloatJitType, JitType.MpIntJitType, JitType.SimpleJitType<T, JT> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JitType.IntJitTypeint1: a 1-byte integerstatic final JitType.IntJitTypeint2: a 2-byte integerstatic final JitType.IntJitTypeint3: a 3-byte integerstatic final JitType.IntJitTypeint4: a 4-byte integer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasInt()Re-apply theintegerbehavior to this typebType()The JVM type of the variable that can represent a p-code variable of this typefinal booleanIndicates whether some other object is "equal to" this one.ext()Extend this p-code type to the p-code type that fills its entire host JVM type.static JitType.IntJitTypeforSize(int size) Get the type for an integer of the given size 1 through 4final inthashCode()Returns a hash code value for this object.Get the p-code type that describes the part of the variable in each legGet the p-code type that describes the part of the variable in each legnm()Part of the name of a JVM local variable allocated for this typeintpref()The preference for this type.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JitType.LeggedJitType
castLegsLE
-
Field Details
-
I1
int1: a 1-byte integer -
I2
int2: a 2-byte integer -
I3
int3: a 3-byte integer -
I4
int4: a 4-byte integer
-
-
Constructor Details
-
IntJitType
public IntJitType(int size) Compact constructor to check the size- Parameters:
size- the size in bytes
-
-
Method Details
-
forSize
Get the type for an integer of the given size 1 through 4- Parameters:
size- the size in bytes- Returns:
- the type
- Throws:
IllegalArgumentException- for any size not 1 through 4
-
pref
-
nm
-
bType
Description copied from interface:JitType.SimpleJitTypeThe JVM type of the variable that can represent a p-code variable of this type- Specified by:
bTypein interfaceJitType.SimpleJitType<Types.TInt, JitType.IntJitType>- Returns:
- the primitive type (not boxed)
-
ext
Description copied from interface:JitTypeExtend this p-code type to the p-code type that fills its entire host JVM type.This is useful, e.g., when multiplying two
int3values usingimulthat the result might be anint4and so may need additional conversion.- Specified by:
extin interfaceJitType- Specified by:
extin interfaceJitType.SimpleJitType<Types.TInt, JitType.IntJitType>- Returns:
- the extended type
-
asInt
Description copied from interface:JitType.SimpleJitTypeRe-apply theintegerbehavior to this typeThis may be slightly faster than
JitTypeBehavior.INTEGER.resolve(this), because each type can pick its int type directly, and integer types can just returnthis.- Specified by:
asIntin interfaceJitType.SimpleJitType<Types.TInt, JitType.IntJitType>- Returns:
- this type as an int
-
legTypesBE
Description copied from interface:JitTypeGet the p-code type that describes the part of the variable in each legEach whole leg will have the type
I4, and the partial leg, if applicable, will have its appropriate smaller integer type.- Specified by:
legTypesBEin interfaceJitType- Specified by:
legTypesBEin interfaceJitType.LeggedJitType<Types.TInt, JitType.IntJitType>- Returns:
- the list of types, each fitting in a JVM int, in big-endian order.
-
legTypesLE
Description copied from interface:JitTypeGet the p-code type that describes the part of the variable in each legEach whole leg will have the type
I4, and the partial leg, if applicable, will have its appropriate smaller integer type.- Specified by:
legTypesLEin interfaceJitType- Returns:
- the list of types, each fitting in a JVM int, in little-endian order.
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
size
-