Пример #1
0
  public Symbol getPhiFunctionSymbol(String strName) {
    Symbol symRet = null;

    for (int i = 0; i < getPhiFunctions().size(); i++) {
      PhiFunction phiFunc = getPhiFunctions().get(i);

      if (0 == phiFunc.getVariable().getName().compareTo(strName)) {
        __debugPrintln("Found Symbol for " + strName);
        symRet =
            new Symbol(
                "" + phiFunc.getConstValue(), Symbol.SymbolType.CONSTANT, Symbol.DataType.INTEGER);
        symRet.setIntegerValue(phiFunc.getConstValue());
        break;
      }
    }

    return symRet;
  }
Пример #2
0
  public int getPhiFunctionConstValue(String strName) {
    int nRet = 0;

    for (int i = 0; i < getPhiFunctions().size(); i++) {
      PhiFunction phiFunc = getPhiFunctions().get(i);

      if (0 == phiFunc.getVariable().getName().compareTo(strName)) {
        if (phiFunc.isConst()) {
          nRet = phiFunc.getConstValue();
          break;
        }
      }
    }

    return nRet;
  }