public Expr pop(final Type type) {
		final Expr top = (Expr) stack.remove(stack.size() - 1);

		final Type topType = top.type();

		height -= topType.stackHeight();

		if (type.isAddress()) {
			if (!topType.isAddress()) {
				throw new IllegalArgumentException("Expected " + type
						+ ", stack = " + toString());
			}
		} else if (type.isReference()) {
			if (!topType.isReference()) {
				throw new IllegalArgumentException("Expected " + type
						+ ", stack = " + toString());
			}
		} else if (type.isIntegral()) {
			if (!topType.isIntegral()) {
				throw new IllegalArgumentException("Expected " + type
						+ ", stack = " + toString());
			}
		} else if (!type.equals(topType)) {
			throw new IllegalArgumentException("Expected " + type
					+ ", stack = " + toString());
		}

		return top;
	}