} else { if(init&&(cur.filter instanceof SIRTwoStageFilter)) System.err.println("Warning: Two-Stage filter "+cur.filter+" did not fire in init phase.");
    private static void makeWorkBody(List filterInfo, 				     JBlock statements,				     boolean init) {	// for all the filters...	for (int i=0; i<filterInfo.size(); i++) {	    FilterInfo cur = (FilterInfo)filterInfo.get(i);	    PhaseInfo curPhase = init ? cur.init : cur.steady;	    // we'll only need the "next" fields if we're not at the	    // end of a pipe.	    FilterInfo next = null;	    PhaseInfo nextPhase = null;	    // get the next fields	    if (i<filterInfo.size()-1) {		next = (FilterInfo)filterInfo.get(i+1);		nextPhase = init ? next.init : next.steady;	    }	    // if the current filter doesn't execute at all, continue	    // (FIXME this is part of some kind of special case for 	    // filters that don't execute at all in a schedule, I think.)	    if (curPhase.num!=0) {		// if in the steady-state phase, restore the peek values		if (!init) {		    statements.addStatement(makePeekRestore(cur, curPhase));		}		SIRFilter filter=cur.filter;		// get the filter's work function		JMethodDeclaration work = filter.getWork();		// take a deep breath and clone the body of the work function		JBlock oldBody = new JBlock(null, work.getStatements(), null);		JBlock body = (JBlock)ObjectDeepCloner.deepCopy(oldBody);		// move variable declarations from front of <body> to		// front of <statements>		moveVarDecls(body, statements);		// mutate <statements> to make them fit for fusion		FusingVisitor fuser = 		    new FusingVisitor(curPhase, nextPhase, i!=0,				      i!=filterInfo.size()-1);		for (ListIterator it = body.getStatementIterator(); 		     it.hasNext() ; ) {		    ((JStatement)it.next()).accept(fuser);		}		if(init&&(filter instanceof SIRTwoStageFilter)) {		    JMethodDeclaration initWork = ((SIRTwoStageFilter)filter).getInitWork();		    // take a deep breath and clone the body of the work function		    JBlock oldInitBody = new JBlock(null, initWork.getStatements(), null);		    JBlock initBody = (JBlock)ObjectDeepCloner.deepCopy(oldInitBody);		    // move variable declarations from front of <body> to		    // front of <statements>		    moveVarDecls(initBody, statements);		    // mutate <statements> to make them fit for fusion		    fuser = 			new FusingVisitor(curPhase, nextPhase, i!=0,					  i!=filterInfo.size()-1);		    for (ListIterator it = initBody.getStatementIterator(); 			 it.hasNext() ; ) {			((JStatement)it.next()).accept(fuser);		    }		    statements.addStatement(initBody);		    if(curPhase.num-1>0)			statements.addStatement(makeForLoop(body,							    curPhase.loopCounter,							    new 								JIntLiteral(curPhase.num-1))					    );		} else {		    		    // get <body> into a loop in <statements>		    statements.addStatement(makeForLoop(body,							curPhase.loopCounter,							new 							    JIntLiteral(curPhase.num))					    );		}	    }	    // if there's any peek buffer, store items to it	    if (cur.peekBufferSize>0) {		statements.addStatement(makePeekBackup(cur, curPhase));	    }	}    }