null,
    public JMethodDeclaration makeNewWork(int functionType, /* either INITWORK or WORK */					  JVariableDefinition realWeightField,					  JVariableDefinition imagWeightField,					  JVariableDefinition partialField,					  int filterSize, int x, int N) {	// parameter check	if ((functionType != INITWORK) && (functionType != WORK)) {	    throw new IllegalArgumentException("function type must be either WORK or INITWORK");	}	/* the body of the new work function */	JBlock body = new JBlock();	/* make a local variable for a buffer to hold values from the input tape. */	JVariableDefinition inputBuffer;	inputBuffer = new JVariableDefinition(null,         /* token reference */					      0,            /* modifiers */					      getArrayType(), /* float* */					      INPUT_BUFFER_NAME, /* ident */					      null);        /* initializer*/	/* stick in a declaration statement for the buffer into the body of the function. */	body.addStatement(new JVariableDeclarationStatement(null, inputBuffer, null));	/* allocate space for the input buffer */	JLocalVariableExpression buffExpr = new JLocalVariableExpression(null, inputBuffer);	JNewArrayExpression      newExpr = getNewArrayExpression(filterSize);	JAssignmentExpression    assignExpr = new JAssignmentExpression(null, buffExpr, newExpr);	body.addStatement(new JExpressionStatement(null,assignExpr,makeComment("allocate space for input buffer.")));	/* now, copy the data from the input tape into the buffer, element by element */	for (int i=0; i<(N+x-1); i++) {	    JLocalVariableExpression currentBuffExpr = new JLocalVariableExpression(null, inputBuffer);	    JArrayAccessExpression currentAccessExpr = new JArrayAccessExpression(null, currentBuffExpr, new JIntLiteral(i));	    SIRPeekExpression      currentPeekExpr   = new SIRPeekExpression(new JIntLiteral(i), CStdType.Float);	    JAssignmentExpression currentAssignExpr  = new JAssignmentExpression(null, currentAccessExpr, currentPeekExpr);	    /* note that currentAssignExpr is buff[i] = peek(i) */	    body.addStatement(new JExpressionStatement(null, currentAssignExpr, null));	}	/* add statements to set the rest of the input buffer (eg pad with zeros). */	for (int i=(N+x-1); i<(N+2*(x-1)); i++) {	    body.addStatement(makeLocalArrayAssignment(inputBuffer, i, 0.0f));	}		/* stick in a call to the do_fast_convolution routine that gets linked in via the C library. */	// prep the args	JExpression[] externalArgs = new JExpression[4];	externalArgs[0] = new JLocalVariableExpression(null, inputBuffer);	externalArgs[1] = new JFieldAccessExpression(null, new JThisExpression(null), realWeightField.getIdent());	externalArgs[2] = new JFieldAccessExpression(null, new JThisExpression(null), imagWeightField.getIdent());	externalArgs[3] = new JIntLiteral(filterSize);	JMethodCallExpression externalCall = new JMethodCallExpression(null,               /* token reference */								       null,               /* prefix */								       FAST_CONV_EXTERNAL, /* ident */								       externalArgs);      /* args */	JavaStyleComment[] comment = makeComment("callout to " + FAST_CONV_EXTERNAL + " to do actual DFT, mult, IDFT. "); 	body.addStatement(new JExpressionStatement(null,externalCall,comment));            /* comments */	/* if we are in the normal work function, push out the first x-1	   values from the local buffer added to the partial results */	if (functionType == WORK) {	    for (int i=0; i<(x-1); i++) {		body.addStatement(makeArrayAddAndPushStatement(partialField.getIdent(), inputBuffer, i));	    }	}		/* now, put in code that will push the appropriate values inputBuffer[x-1 to N+x-2] back on the tape */	for (int i=(x-1); i<(N+x-1); i++) {	    body.addStatement(makeArrayPushStatement(inputBuffer, i));	}	/* now, copy the last x-1 values in the input buffer into the partial results buffer. */	for (int i=0; i<(x-1); i++) {	    body.addStatement(makePartialCopyExpression(partialField.getIdent(), i, inputBuffer, N+x-1+i));	}		    	/* now, free the memory that we allocated to buffer (this is a wicked hack,	   as there is no notion of "free" in java/streamit */	JExpression[] freeArgs = new JExpression[1];	freeArgs[0] = new JLocalVariableExpression(null, inputBuffer);	JMethodCallExpression freeCall = new JMethodCallExpression(null,     /* token reference */								   null,     /* prefix */								   "free",   /* ident */								   freeArgs);/* args */	comment = makeComment("call to free the buffer space");	body.addStatement(new JExpressionStatement(null, freeCall, comment));		/* stick in the appropriate number (N+x-1) of pop calls */	for (int i=0; i<(N+x-1); i++) {	    body.addStatement(makePopStatement());	}	/* figure out what the name of the function should be (work, or initWork) **/	String ident = (functionType == WORK) ? "work" : "initWork";		/* wrap up all the mess that we just made into a new JMethodDeclaration and return it to the caller */	return new JMethodDeclaration(null,                  /* token reference */				      ACC_PUBLIC,            /* modifiers */				      CStdType.Void,         /* return type */				      ident,                 /* identifier */				      JFormalParameter.EMPTY,/* paramters */				      CClassType.EMPTY,      /* exceptions */				      body,                  /* body */				      null,                  /* java doc */				      null);                 /* java style comment */    }