The attached patch provides a compiler hook for disable or
enabling assertion. It does add any new flags or fine-grained
control, yet: assertions are enabled if generating class files
or not optimizing, and disabled if optimizing and generying native
code. I think this is a reasonable default; new options can be
use to override the default - I may add those later.
Note that when assertions are disabled, we still build a tree
that includes the assertion and the asertion value, so the
compiler can check for errors. But because the assertion
is rewritten to 'false && ASSERTION" it will get optimized out.
(It least it does this when optimizing; we should verify this
when we add a flag to disable assertion even when not optimizing.)
Tested in Fedora Core (with Mauve and Jacks); no regressions.
I'll check this into mainline in a few days if I don't hear objections.