public Object visit(IfStatement node) {
            Block block = node.getThenPart();
            if (block != null) {
                node.setThenPart(visitBlock(block));
            }

            block = node.getElsePart();
            if (block != null) {
                node.setElsePart(visitBlock(block));
            }

            if (!node.getCondition().isExceptionPossible()) {
                return node;
            }

            Variable[] vars = node.getMergedVariables();
            int length;

            if (vars == null || (length = vars.length) == 0) {
                return new ExceptionGuardStatement(node, null);
            }

            // Create replacement assignments to ensure merged variables get
            // assigned null.
            Statement[] replacements = new Statement[length];
            SourceInfo info = node.getSourceInfo();

            for (int i=0; i<length; i++) {
                Variable v = vars[i];
                VariableRef lvalue = new VariableRef(v.getSourceInfo(),
                                                     v.getName());
                lvalue.setVariable(v);

                replacements[i] = new AssignmentStatement
                    (info, lvalue, new NullLiteral(info));
            }

            Statement replacement = new StatementList(info, replacements);
            return new ExceptionGuardStatement(node, replacement);
        }