public void finish() {
    try {
      addInstruction(new ReturnInstruction(myFactory, FList.emptyList(), null));
      myLoopNumbers = LoopAnalyzer.calcInLoop(this);
      new LiveVariablesAnalyzer(this).flushDeadVariablesOnStatementFinish();
    }
    catch (ProcessCanceledException ex) {
      throw ex;
    }
    catch (RuntimeException ex) {
      throw new RuntimeExceptionWithAttachments(ex, new Attachment("flow.txt", toString()));
    }
  }
public void finish()