public Object visit(ReturnStatement node) {
            Expression expr = node.getExpression();

            boolean profilingEnabled = isProfilingEnabled();

            // If generating sub-format...
            if (mCaseNodes != null) {
                if (expr != null) {
                    Type type = expr.getType();
                    if (!(Type.VOID_TYPE.equals(type))) {
                        // Generating sub-format and returning non-void, so
                        // store result in a field for later retrieval.
                        mBuilder.loadThis();
                        generate(node.getExpression());
                        TypeDesc td = makeDesc(mReturnValue.getType());
                        mBuilder.storeField(mReturnValue.getName(), td);
                    }
                    else {
                        generate(node.getExpression());
                    }
                }
            }
            else if (expr != null) {
                generate(node.getExpression());
                if (profilingEnabled)
                    generateGlobalProfilingEnd();
                mBuilder.returnValue(makeDesc(expr.getType()));
            }
            else {
                if (profilingEnabled)
                    generateGlobalProfilingEnd();
                mBuilder.returnVoid();
            }

            return null;
        }