Java Code Examples for com.android.dx.rop.code.FillArrayDataInsn#getConstant()

The following examples show how to use com.android.dx.rop.code.FillArrayDataInsn#getConstant() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RopTranslator.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void visitFillArrayDataInsn(FillArrayDataInsn insn) {
    SourcePosition pos = insn.getPosition();
    Constant cst = insn.getConstant();
    ArrayList<Constant> values = insn.getInitValues();
    Rop rop = insn.getOpcode();

    if (rop.getBranchingness() != Rop.BRANCH_NONE) {
        throw new RuntimeException("shouldn't happen");
    }
    CodeAddress dataAddress = new CodeAddress(pos);
    ArrayData dataInsn =
        new ArrayData(pos, lastAddress, values, cst);

    TargetInsn fillArrayDataInsn =
        new TargetInsn(Dops.FILL_ARRAY_DATA, pos, getRegs(insn),
                dataAddress);

    addOutput(lastAddress);
    addOutput(fillArrayDataInsn);

    addOutputSuffix(new OddSpacer(pos));
    addOutputSuffix(dataAddress);
    addOutputSuffix(dataInsn);
}
 
Example 2
Source File: RopTranslator.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void visitFillArrayDataInsn(FillArrayDataInsn insn) {
    SourcePosition pos = insn.getPosition();
    Constant cst = insn.getConstant();
    ArrayList<Constant> values = insn.getInitValues();
    Rop rop = insn.getOpcode();

    if (rop.getBranchingness() != Rop.BRANCH_NONE) {
        throw new RuntimeException("shouldn't happen");
    }
    CodeAddress dataAddress = new CodeAddress(pos);
    ArrayData dataInsn =
        new ArrayData(pos, lastAddress, values, cst);

    TargetInsn fillArrayDataInsn =
        new TargetInsn(Dops.FILL_ARRAY_DATA, pos, getRegs(insn),
                dataAddress);

    addOutput(lastAddress);
    addOutput(fillArrayDataInsn);

    addOutputSuffix(new OddSpacer(pos));
    addOutputSuffix(dataAddress);
    addOutputSuffix(dataInsn);
}
 
Example 3
Source File: RopTranslator.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
      @Override
public void visitFillArrayDataInsn(FillArrayDataInsn insn) {
          SourcePosition pos = insn.getPosition();
          Constant cst = insn.getConstant();
          ArrayList<Constant> values = insn.getInitValues();
          Rop rop = insn.getOpcode();

          if (rop.getBranchingness() != Rop.BRANCH_NONE) {
              throw new RuntimeException("shouldn't happen");
          }
          CodeAddress dataAddress = new CodeAddress(pos);
          ArrayData dataInsn =
              new ArrayData(pos, lastAddress, values, cst);

          TargetInsn fillArrayDataInsn =
              new TargetInsn(Dops.FILL_ARRAY_DATA, pos, getRegs(insn),
                      dataAddress);

          addOutput(lastAddress);
          addOutput(fillArrayDataInsn);

          addOutputSuffix(new OddSpacer(pos));
          addOutputSuffix(dataAddress);
          addOutputSuffix(dataInsn);
      }
 
Example 4
Source File: RopTranslator.java    From buck with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
public void visitFillArrayDataInsn(FillArrayDataInsn insn) {
    SourcePosition pos = insn.getPosition();
    Constant cst = insn.getConstant();
    ArrayList<Constant> values = insn.getInitValues();
    Rop rop = insn.getOpcode();

    if (rop.getBranchingness() != Rop.BRANCH_NONE) {
        throw new RuntimeException("shouldn't happen");
    }
    CodeAddress dataAddress = new CodeAddress(pos);
    ArrayData dataInsn =
        new ArrayData(pos, lastAddress, values, cst);

    TargetInsn fillArrayDataInsn =
        new TargetInsn(Dops.FILL_ARRAY_DATA, pos, getRegs(insn),
                dataAddress);

    addOutput(lastAddress);
    addOutput(fillArrayDataInsn);

    addOutputSuffix(new OddSpacer(pos));
    addOutputSuffix(dataAddress);
    addOutputSuffix(dataInsn);
}