public void visitEnd() {
        // Compares TryCatchBlockNodes by the length of their "try" block.
        Comparator comp = new Comparator() {

            public int compare(Object o1, Object o2) {
                int len1 = blockLength((TryCatchBlockNode) o1);
                int len2 = blockLength((TryCatchBlockNode) o2);
                return len1 - len2;
            }

            private int blockLength(TryCatchBlockNode block) {
                int startidx = instructions.indexOf(block.start);
                int endidx = instructions.indexOf(block.end);
                return endidx - startidx;
            }
        };
        Collections.sort(tryCatchBlocks, comp);
        if (mv != null) {
            accept(mv);
        }
    }