示例#1
0
  /* Overridden from SIRStream: */
  public void setWork(JMethodDeclaration work) {
    // if new work function has no I/O rates and old one does,
    // then transfer rates to new one.  This is an ugly remnant of
    // the old mode of operation, where I/O rates were stored
    // outside the function.
    if (!work.doesIO()) {
      work.setPeek(getWork().getPeek());
      work.setPop(getWork().getPop());
      work.setPush(getWork().getPush());
    }

    addReplacementMethod(work, getWork());
    getPhases()[0] = work;
  }