runtime/*.[ch]:
trace/*.[chyl]:
As above. In some places, improve comments, e.g. by expanding contractions
such as "we've". Add #ifndef guards against double inclusion around
the trace/*.h files that did not already have them.
tools/*:
Make the corresponding changes in shell scripts that generate .[ch] files
in the runtime.
tests/*:
Conform to a slight change in the text of a message.
Branches: main, 10.04
Fix bug #67, where mprof would abort due to multiple lines in the Prof.Decl
file having the same entry label.
The cause was the files runtime/mercury_ho_call_inits.i and
runtime/mercury_method_call_inits.i being generated with duplicate
MR_init_entry_an() lines. That could happen if parallel make is used in the
runtime directory. Due to bad makefile rules, the command which generates
the files (as side-effects) would be invoked multiple times, concurrently.
Finally, as those files weren't generated atomically, the concurrent
invocations would append duplicate lines to the files.
runtime/Mmakefile:
Don't list multiple outputs as the result of the make_spec_ho_call and
make_spec_method_call commands, which is the same as writing multiple
independent rules, one for each output.
Don't mention the *_declares.i and *_inits.i files at all.
They will be created when the *_codes.i files are created.
The downside is, if they are removed (and *_codes.i are not), then
make will not know how to generate them.
tools/make_spec_ho_call:
tools/make_spec_method_call:
Make these scripts generate the *_declares.i and *_inits.i files
atomically (not strictly necessary with the previous change).
Estimated hours taken: 3
Branches: main
Auto-generate the code for performing higher order calls and method calls.
This way, we can vary the number of explicit arguments we specialize for
independently of the number of hidden arguments we specialize for.
(Previously, we did not specialize on the number of hidden arguments at all.)
tools/make_spec_ho_call:
A new script to auto-generate the code for performing higher order
calls.
tools/make_spec_method_call:
A new script to auto-generate the code for performing method calls.
runtime/mercury_ho_call.c:
Replace the old handwritten code for performing higher order and
method calls with #includes of the auto-generated files.
runtime/Mmakefile:
Make the object files of mercury_ho_call.c depend on the auto-generated
files, and through them, on the scripts.
compiler/options.m:
Conform to the new parameters in the scripts.