Message-ID: <1403716022.21035.1416987864774.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_21034_1928180636.1416987864774" ------=_Part_21034_1928180636.1416987864774 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Partly for historical reasons, we use our own built-in assertion facilit= y rather than the one that appeared in Sun®'s JDK 1.4. All assertion ch= ecks have one of the two forms:
VM.VerifyAssertions is a
public static final f=
config.assertions configuration variable determines =
VM.VerifyAssertions' value. If
is set to
none, Jikes RVM has no assertion overhead.
If you use the form without a message, then the default message=
vm internal error at:" will appear.
If you use the form with a message the message must be= a single string literal. Doing string appends in assertions can be a sourc= e of horrible performance problems when assertions are enabled (i.e. most d= evelopment builds). If you want to provide a more detailed error message wh= en the assertion fails, then you must use the following coding pattern:
An assertion failure is always followed by a stack dump.
VM.ExtremeAssertions instead of
fyAssertions if the assertion is costly to check but generally usefu=
l. These kinds of assertions are only enabled when
/code> is set to
o guard assertions that relate to the intermediate representation in the op=
The assert keyword may be used in the MMTk Harness.
All code in the system needs to detect and handle errors. If you know th= at your code does not handle certain situations, you should aim to write th= e code in way that detects these situations. The code also needs to be docu= mented well enough so that users get a hint about the source of the problem= . Keep in mind that the Jikes RVM is also used by students who may not be a= s familiar with the domain as researchers are.
VM.= sysFail(..)for builds without assertions if correct execution after= failure is impossible.
-X= :vm:errorsFatal=3Dtrueis set (which is the case in regression tests= ). In other cases, the VM will just revert to using the baseline compiler.<= /li>
validate()method for the opti= on. In other places, the value of the option needs to be checked at a suita= ble time.