public void visitBlock(final Block block) {
		Assert.isTrue(block.graph() == cfg, block + " is not in the CFG");

		Iterator e;

		final Handler handler = (Handler) cfg.handlersMap().get(block);

		// If this block is the first block in an exception handler, make
		// sure that the only predacessor edges the block has are
		// protected blocks that may throw the exception handled by the
		// block. Additionally, we check that there are edges from all
		// protected blocks to the handler block.
		//
		// The predacessor to the first block in an exception handler may
		// be the init block. However, it is not really a protected
		// block, so just overlook it.

		if (handler != null) {
			final HashSet handlerPreds = new HashSet();

			e = handler.protectedBlocks().iterator();

			while (e.hasNext()) {
				final Block prot = (Block) e.next();
				handlerPreds.add(prot);
				handlerPreds.addAll(cfg.preds(prot));
			}

			final HashSet extra = new HashSet(cfg.preds(block));
			extra.removeAll(handlerPreds);
			final HashSet missing = new HashSet(handlerPreds);
			missing.removeAll(cfg.preds(block));

			Assert.isTrue(((extra.size() == 0) && (missing.size() == 0))
					|| ((missing.size() == 1) && missing.contains(cfg.init())),
					"Handler prots = " + handlerPreds
							+ " != handler block preds = " + cfg.preds(block)
							+ " extra = " + extra + " missing = " + missing);
		}

		// Make sure that the predacessor has a successor and vice versa.
		e = cfg.preds(block).iterator();

		while (e.hasNext()) {
			final Block pred = (Block) e.next();
			Assert.isTrue(cfg.succs(pred).contains(block), pred
					+ " has no succ " + block);
			Assert.isTrue(cfg.preds(block).contains(pred), block
					+ " has no pred " + pred);
		}

		e = cfg.succs(block).iterator();

		while (e.hasNext()) {
			final Block succ = (Block) e.next();
			Assert.isTrue(cfg.succs(block).contains(succ), block
					+ " has no succ " + succ);
			Assert.isTrue(cfg.preds(succ).contains(block), succ
					+ " has no pred " + block);
		}

		this.block = block;

		parent = null;
		block.visitChildren(this);
	}