Exemplo n.º 1
0
  // Updates this block's Phi Function
  public void updatePhiFunction(Argument arg, Symbol sym) {
    for (int i = 0; i < getPhiFunctions().size(); i++) {
      PhiFunction phiFunc = getPhiFunctions().get(i);

      if (0 == phiFunc.getVariable().getName().compareTo(arg.getOrigName())) {
        __debugPrintln("Updating Phi Func: " + arg.getOrigName() + " to " + sym.getIntegerValue());

        phiFunc.updateVariable(arg.getName(), new Symbol(sym));

        break;
      }
    }
  }
Exemplo n.º 2
0
  public void updatePhiFunctionCurName(String strCurName, Symbol sym) {
    for (int i = 0; i < getPhiFunctions().size(); i++) {
      PhiFunction phiFunc = getPhiFunctions().get(i);

      if (phiFunc.varInMergeList(strCurName)) {
        __debugPrintln(
            "Updating Phi Func: "
                + phiFunc.getVariable().getName()
                + " to "
                + sym.getIntegerValue());

        phiFunc.updateVariable(strCurName, new Symbol(sym));

        break;
      }
    }
  }