if ((left.getType().isArrayType()) && ((right.getType().isArrayType() || right instanceof SIRPopExpression) && !(right instanceof JNewArrayExpression))) {
boolean arrayType = ((left.getType()!=null && left.getType().isArrayType()) || (right.getType()!=null && right.getType().isArrayType())); if (arrayType && !(right instanceof JNewArrayExpression)) {
    public void visitAssignmentExpression(JAssignmentExpression self,            JExpression left, JExpression right) {        if (left.getType() != null                && left.getType().toString().endsWith("Portal")) {            p.print("/* void */");            return;        }        // print the correct code for array assignment        // this must be run after renaming!!!!!!        if (left.getType() == null || right.getType() == null) {            boolean oldStatementContext = statementContext;            lastLeft = left;            printLParen();            statementContext = false;            left.accept(this);            p.print(" = ");            right.accept(this);            statementContext = oldStatementContext;            printRParen();            return;        }        if ((left.getType().isArrayType())                && ((right.getType().isArrayType()                         || right instanceof SIRPopExpression)                         && !(right instanceof JNewArrayExpression))) {            CArrayType type = (CArrayType)right.getType();	    String dims[] = Util.makeString(type.getDims());	    // dims should never be null now that we have static array	    // bounds	    assert dims != null;	    /*            // if we cannot find the dim, just create a pointer copy            if (dims == null) {                boolean oldStatementContext = statementContext;                lastLeft = left;                printLParen();                statementContext = false;                left.accept(this);                p.print(" = ");                right.accept(this);                statementContext = oldStatementContext;                printRParen();                return;            }	    */            p.print("{\n");            p.print("int ");            // print the index var decls            for (int i = 0; i < dims.length - 1; i++)                p.print(RawExecutionCode.ARRAY_COPY + i + ", ");            p.print(RawExecutionCode.ARRAY_COPY + (dims.length - 1));            p.print(";\n");            for (int i = 0; i < dims.length; i++) {                p.print("for (" + RawExecutionCode.ARRAY_COPY + i + " = 0; "                        + RawExecutionCode.ARRAY_COPY + i + " < " + dims[i]                        + "; " + RawExecutionCode.ARRAY_COPY + i + "++)\n");            }            left.accept(this);            for (int i = 0; i < dims.length; i++)                p.print("[" + RawExecutionCode.ARRAY_COPY + i + "]");            p.print(" = ");            right.accept(this);            for (int i = 0; i < dims.length; i++)                p.print("[" + RawExecutionCode.ARRAY_COPY + i + "]");            p.print(";\n}\n");            return;        }        // stack allocate all arrays in the work function        // done at the variable definition,        if (!isInit && right instanceof JNewArrayExpression                && (left instanceof JLocalVariableExpression)) {            // (((CArrayType)((JNewArrayExpression)right).getType()).getArrayBound()            // < 2)) {            // get the basetype and print it            CType baseType = ((CArrayType) ((JNewArrayExpression) right)                    .getType()).getBaseType();            printType(baseType);            p.print(" ");            // print the identifier            // Before the ISCA hack this was how we printed the var ident            // left.accept(this);            String ident;            ident = ((JLocalVariableExpression) left).getVariable().getIdent();            if (KjcOptions.ptraccess) {                // HACK FOR THE ICSA PAPER, !!!!!!!!!!!!!!!!!!!!!!!!!!!!!                // turn all array access into access of a pointer pointing to                // the array                p.print(ident + "_Alloc");                // print the dims of the array                printDecl(left.getType(), ident);                // print the pointer def and the assignment to the array                p.print(";\n");                p.print(baseType + " *" + ident + " = " + ident + "_Alloc");            } else {                // the way it used to be before the hack                left.accept(this);                // print the dims of the array                printDecl(left.getType(), ident);            }            return;        }        // do not initialize class variables        if (right instanceof JUnqualifiedInstanceCreation)            return;        boolean oldStatementContext = statementContext;        lastLeft = left;        printLParen();        statementContext = false;        left.accept(this);        p.print(" = ");        right.accept(this);        statementContext = oldStatementContext;        printRParen();        p.print("/*" + left.getType() + "*/");    }