runtime/{engine.h,engine.mod,memory.c,wrapper.mod}:
Add a new option `-dt' for use with the modes that
don't use gcc non-local gotos. If this option is
enabled, the runtime system will use the slow driver
loop rather than the unrolled one, and if a seg fault
occurs it will print out the last 40 locations.
(This is most useful in combination with -DDEBUG_LABELS,
otherwise you'll just get hex addresses.)
memory.c:
Now memory diagnostics are printed on stderr.
wrapper.mod, memory.c:
Convert whens to cases and ors to else ifs.
other files:
copyright notices.
Changes to examples/Mercury required changes to some other files.
The most important such change is that mod2c and gnuc now take a speed
grade argument of the form -s{fast,reg,jump,none,init,debug}. The -s
option of mod2c supersedes the -g option which is retained for backward
compatibility.
Renamed test_harness to wrapper because underscores now separate grade names
from the rest of the file base name in cake rules.
Some of these are included in imp.h, some aren't; the criterion is whether
automatically generated modules need the information in them.
Created a system whereby Mercury programs can be automatically compiled.
One part is the Mercury cakefile in examples (and the Cakefile that uses it),
which defines two targets for each Mercury program. These are e.g. nrev_fast
and nrev_debug for nrev.nl. As usual with System, the file Conf has one
line for each program in the directory; the file Entry likewise contains
the default entry point. Mod2init now inserts the default entry point
into the xxx_init.c file, and test_harness picks it up from there.
The other part is the creation and installation of the files and tools
referred to by the Mercury cakefile. These include scripts in /usr/contrib/bin,
the system modules in /usr/contrib/lib/mercury/modules, the system header
files in /usr/contrib/lib/mercury/inc, and two libraries, lib{fast,debug}mer.a
in each of /usr/contrib/lib/mercury/{sun4,sgi}.