Record Class Local<T extends Types.BNonVoid>
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.gen.util.Local<T>
- Type Parameters:
T- the (machine) type of the variable.- Record Components:
type- the typename- the nameindex- the index
public record Local<T extends Types.BNonVoid>(T extends Types.BNonVoid type, String name, int index)
extends Record
The handle to a local variable
Direct use of the canonical constructor is not recommended. We may later hide this behind an interface.
The JVM <t>load and <t>store instructions all take an index argument. We would
rather not have to keep track of indices, but instead wrap them in some named handle. These
handles are generated by Scope.decl(BNonVoid, String),
Methods.Def.param(ParamFunction, BNonVoid, String, Consumer), and
Methods.Def.done(ObjDef, TRef, Consumer). For the most part, the user need not worry at all about
indices, only types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.name()Returns the value of thenamerecord component.static <T extends Types.BNonVoid>
Local<T> Construct a local variable handlefinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Local
-
-
Method Details
-
of
Construct a local variable handleDirect use of this method is not recommended. It may be made private later.
- Type Parameters:
T- the type of the variable- Parameters:
type- the typename- the nameindex- the index- Returns:
- the handle
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
-
name
-
index
-