diff options
Diffstat (limited to 'dx/src/com/android/jack/dx/dex/code/DalvInsn.java')
-rw-r--r-- | dx/src/com/android/jack/dx/dex/code/DalvInsn.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dx/src/com/android/jack/dx/dex/code/DalvInsn.java b/dx/src/com/android/jack/dx/dex/code/DalvInsn.java index 9dcddd4..0cb8964 100644 --- a/dx/src/com/android/jack/dx/dex/code/DalvInsn.java +++ b/dx/src/com/android/jack/dx/dex/code/DalvInsn.java @@ -19,6 +19,7 @@ package com.android.jack.dx.dex.code; import com.android.jack.dx.rop.code.RegisterSpec; import com.android.jack.dx.rop.code.RegisterSpecList; import com.android.jack.dx.rop.code.SourcePosition; +import com.android.jack.dx.ssa.RegisterMapper; import com.android.jack.dx.util.AnnotatedOutput; import com.android.jack.dx.util.Hex; import com.android.jack.dx.util.TwoColumnOutput; @@ -380,6 +381,17 @@ public abstract class DalvInsn { } /** + * Returns an instance that is just like this one, except that the + * register list is mapped by using {@code mapper}. + * + * @param mapper {@code non-null;} used to map registers + * @return {@code non-null;} an appropriately-constructed instance + */ + public DalvInsn withMapper(RegisterMapper mapper) { + return withRegisters(mapper.map(getRegisters())); + } + + /** * Gets the size of this instruction, in 16-bit code units. * * @return {@code >= 0;} the code size of this instruction |