PATCH for better assertion control.

Per Bothner
Sat Mar 13 10:07:00 GMT 2004

This patch support new --enable-assertions[=class-or-package]
and --disable-assertions[=class-or-package] options.  The default
is assertion are disabled if optimizing and not generating
classes, but this can be overridden.

Note that "disabling" means we don't generate code to check
assertions.  "Enabling" means we generate code to check
assrtions, but that doesn't mean we actually check then.
For that you need to also enable asserations are run-time.
Sun's java command has such an option, but we don't so far.

I'll send a documentation patch before I check this is in.

A bonus part of this patch (which couls probably be split out)
is the change to build_incomplete_class_ref.  This handles assert
and ".class" in inner classes inside a top-level interface.

Tested on Fedora1 with no regressions.
	--Per Bothner

More information about the Java mailing list