meths[i].accept(new Propagator(findLocals(meths[i])));
Propagator prop = new Propagator(findLocals(meths[i])); meths[i].accept(prop);
    private void doPropagation(SIRStream filter) {        JMethodDeclaration[] meths = filter.getMethods();        // Do not propagate fields on lhs of assignment        // unless involved in array offest calculation        final boolean[] inLeftHandSide = {false};        final boolean[] inArrayOffest = {false};        SLIRReplacingVisitor theVisitor = new SLIRReplacingVisitor() {                public Object visitAssignmentExpression(JAssignmentExpression self,                                                        JExpression left, JExpression right) {                    inLeftHandSide[0] = true;                    JExpression newLeft = (JExpression)left.accept(this);                    inLeftHandSide[0] = false;                    JExpression newRight = (JExpression)right.accept(this);                    return new JAssignmentExpression(self.getTokenReference(),                                                     newLeft, newRight);                }                public Object visitFieldExpression(JFieldAccessExpression self,                                                   JExpression left, String ident) {                    Object orig = super.visitFieldExpression(self, left, ident);                    if (canFieldPropagate(ident)                        && (inArrayOffest[0]                            || !inLeftHandSide[0])) {                        return propagatedField(ident);                    }                    else {                        return orig;                    }                }                public Object visitArrayAccessExpression(JArrayAccessExpression self, JExpression prefix,                                                         JExpression accessor) {                    JExpression newPfx = (JExpression)prefix.accept(this);                    if (newPfx != null && newPfx != prefix) {                        self.setPrefix(newPfx);                    }                    boolean oldInArrayOffset = inArrayOffest[0];                    inArrayOffest[0] = true;                    // Recurse so we have something to return.                      //                Object orig = super.visitArrayAccessExpression(self,prefix, acc);                    JExpression newAcc = (JExpression)accessor.accept(this);                    if (newAcc != null && newAcc != accessor) {                        self.setAccessor(newAcc);                    }                    inArrayOffest[0] = oldInArrayOffset;                    // Take a harder look at what we have...                    if (!(prefix instanceof JFieldAccessExpression))                        return self;                    JFieldAccessExpression fae = (JFieldAccessExpression) prefix;                    if (!(fae.getPrefix() instanceof JThisExpression))                        return self;                    // Okay, the base is a FAE with this. Yay.                    // Save its name.                    String name = fae.getIdent();                    // Now, is the offset an integer literal?                    if (!(newAcc instanceof JIntLiteral))                        return self;                    // Yay, we win (hopefully).                    int slot = ((JIntLiteral) newAcc).intValue();                    if (canArrayPropagate(name, slot)                        && (inArrayOffest[0]                            || !inLeftHandSide[0])) {                        return propagatedArray(name, slot);                    } else {                        return self;                    }                }            };        for (int i = 0; i < meths.length; i++) {            meths[i].accept(theVisitor);            // Also run some simple algebraic simplification now.            meths[i].accept(new Propagator(findLocals(meths[i])));            // Raise Variable Declarations to beginning of block            // meths[i].accept(new VarDeclRaiser());        }        // propagate into initializers and types of field declarations        JFieldDeclaration[] fields = filter.getFields();        Propagator prop = new Propagator(new Hashtable());        for (int i = 0; i < fields.length; i++) {            // the field type (propagate into static array bounds)            CType type = fields[i].getType();            if (type.isArrayType()) {                JExpression[] dims = ((CArrayType)type).getDims();                for (int j=0; j<dims.length; j++) {                    dims[j] = (JExpression)dims[j].accept(theVisitor);                    dims[j] = (JExpression)dims[j].accept(prop);                }            }            // initializer            JVariableDefinition var = fields[i].getVariable();            if (var.hasInitializer()) {                JExpression origInit = var.getValue();                JExpression newInit = (JExpression) origInit                    .accept(theVisitor);                newInit = (JExpression) newInit.accept(prop);                if (newInit != origInit) {                    var.setValue(newInit);                }            }        }        // If this is a filter, also run on I/O rates and other field        // initializers        if (filter instanceof SIRPhasedFilter) {            SIRPhasedFilter filt = (SIRPhasedFilter) filter;            for (int j = 0; j < filter.getMethods().length; j++) {                JMethodDeclaration method = filter.getMethods()[j];                // pop                JExpression newPop = (JExpression) method.getPop().accept(                                                                          theVisitor);                newPop = (JExpression) newPop.accept(prop);                if (newPop != null && newPop != method.getPop()) {                    method.setPop(newPop);                }                // peek                JExpression newPeek = (JExpression) method.getPeek().accept(                                                                            theVisitor);                newPeek = (JExpression) newPeek.accept(prop);                if (newPeek != null && newPeek != method.getPeek()) {                    method.setPeek(newPeek);                }                // push                JExpression newPush = (JExpression) method.getPush().accept(                                                                            theVisitor);                newPush = (JExpression) newPush.accept(prop);                if (newPush != null && newPush != method.getPush()) {                    method.setPush(newPush);                }            }        }    }