Class RegisterMapper

java.lang.Object
com.android.dx.ssa.RegisterMapper
Direct Known Subclasses:
BasicRegisterMapper

public abstract class RegisterMapper extends Object
Represents a mapping between two register numbering schemes. Subclasses of this may be mutable, and as such the mapping provided is only valid for the lifetime of the method call in which instances of this class are passed.
  • Constructor Details

    • RegisterMapper

      public RegisterMapper()
  • Method Details

    • getNewRegisterCount

      public abstract int getNewRegisterCount()
      Gets the count of registers (really, the total register width, since category width is counted) in the new namespace.
      Returns:
      ≥ 0 width of new namespace.
    • map

      public abstract RegisterSpec map(RegisterSpec registerSpec)
      Parameters:
      registerSpec - old register
      Returns:
      register in new space
    • map

      public final RegisterSpecList map(RegisterSpecList sources)
      Parameters:
      sources - old register list
      Returns:
      new mapped register list, or old if nothing has changed.
    • map

      public final RegisterSpecSet map(RegisterSpecSet sources)
      Parameters:
      sources - old register set
      Returns:
      new mapped register set, or old if nothing has changed.