Methods Summary |
---|
protected java.lang.String | argString(){@inheritDoc}
return null;
|
private void | calculateInsnsIfNecessary()Helper for {@link #codeSize} and {@link #writeTo} which sets up
{@link #insns} if not already done.
if (insns != null) {
return;
}
RegisterSpecList registers = getRegisters();
int sz = registers.size();
insns = new SimpleInsn[sz];
for (int i = 0, outAt = 0; i < sz; i++) {
RegisterSpec src = registers.get(i);
insns[i] = moveInsnFor(src, outAt);
outAt += src.getCategory();
}
|
public int | codeSize(){@inheritDoc}
int result = 0;
calculateInsnsIfNecessary();
for (SimpleInsn insn : insns) {
result += insn.codeSize();
}
return result;
|
protected java.lang.String | listingString0(boolean noteIndices){@inheritDoc}
RegisterSpecList registers = getRegisters();
int sz = registers.size();
StringBuffer sb = new StringBuffer(100);
for (int i = 0, outAt = 0; i < sz; i++) {
RegisterSpec src = registers.get(i);
SimpleInsn insn = moveInsnFor(src, outAt);
if (i != 0) {
sb.append('\n");
}
sb.append(insn.listingString0(noteIndices));
outAt += src.getCategory();
}
return sb.toString();
|
private static SimpleInsn | moveInsnFor(com.android.dexgen.rop.code.RegisterSpec src, int destIndex)Returns the proper move instruction for the given source spec
and destination index.
return DalvInsn.makeMove(SourcePosition.NO_INFO,
RegisterSpec.make(destIndex, src.getType()),
src);
|
public DalvInsn | withRegisters(com.android.dexgen.rop.code.RegisterSpecList registers){@inheritDoc}
return new HighRegisterPrefix(getPosition(), registers);
|
public void | writeTo(com.android.dexgen.util.AnnotatedOutput out){@inheritDoc}
calculateInsnsIfNecessary();
for (SimpleInsn insn : insns) {
insn.writeTo(out);
}
|