Package com.mebigfatguy.fbcontrib.utils
Class RegisterUtils
- java.lang.Object
-
- com.mebigfatguy.fbcontrib.utils.RegisterUtils
-
public final class RegisterUtils extends java.lang.Object
an auxiliary class for managing and manipulating registers
-
-
Constructor Summary
Constructors Modifier Constructor Description private
RegisterUtils()
private to reinforce the helper status of the class
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getALoadReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used to load a referencestatic int
getAStoreReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used to store a referencestatic int
getLoadReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used in a load operationstatic int
getLocalVariableEndRange(org.apache.bcel.classfile.LocalVariableTable lvt, int reg, int curPC)
returns the end pc of the visible range of this register at this pcstatic int[]
getParameterRegisters(org.apache.bcel.classfile.Method obj)
gets the set of registers used for parametersstatic int
getStoreReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used in a store operation
-
-
-
Method Detail
-
getAStoreReg
public static int getAStoreReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used to store a reference- Parameters:
dbc
- the dismantle byte code parsing the classseen
- the opcode of the store- Returns:
- the register stored into
-
getALoadReg
public static int getALoadReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used to load a reference- Parameters:
dbc
- the dismantle byte code parsing the classseen
- the opcode of the load- Returns:
- the register loaded from
-
getStoreReg
public static int getStoreReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used in a store operation- Parameters:
dbc
- the dismantle byte code parsing the classseen
- the opcode of the store- Returns:
- the register stored into
-
getLoadReg
public static int getLoadReg(edu.umd.cs.findbugs.visitclass.DismantleBytecode dbc, int seen)
returns the register used in a load operation- Parameters:
dbc
- the dismantle byte code parsing the classseen
- the opcode of the load- Returns:
- the register stored into
-
getLocalVariableEndRange
public static int getLocalVariableEndRange(org.apache.bcel.classfile.LocalVariableTable lvt, int reg, int curPC)
returns the end pc of the visible range of this register at this pc- Parameters:
lvt
- the local variable table for this methodreg
- the register to examinecurPC
- the pc of the current instruction- Returns:
- the endpc
-
getParameterRegisters
public static int[] getParameterRegisters(org.apache.bcel.classfile.Method obj)
gets the set of registers used for parameters- Parameters:
obj
- the context object for the method to find the parameter registers of- Returns:
- the set of registers that parameters are using
-
-