Esempio n. 1
0
  /** {@inheritDoc} */
  @Override
  public DalvInsn withRegisters(RegisterSpecList registers) {
    CstInsn result = new CstInsn(getOpcode(), getPosition(), registers, constant);

    if (index >= 0) {
      result.setIndex(index);
    }

    if (classIndex >= 0) {
      result.setClassIndex(classIndex);
    }

    return result;
  }
Esempio n. 2
0
  /** {@inheritDoc} */
  @Override
  public DalvInsn withOpcode(Dop opcode) {
    CstInsn result = new CstInsn(opcode, getPosition(), getRegisters(), constant);

    if (index >= 0) {
      result.setIndex(index);
    }

    if (classIndex >= 0) {
      result.setClassIndex(classIndex);
    }

    return result;
  }