Пример #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;
  }
Пример #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;
  }