Commit Graph

4 Commits

Author SHA1 Message Date
Zoltan Somogyi
53b573692a Convert C code to use // style comments.
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.
2016-07-14 13:57:35 +02:00
Julien Fischer
7e20ef82bd Avoid portability problems with expr.
Branches: main, 10.04

tools/make_spec_ho_call:
tools/make_spec_method_call:
	Avoid portability problems with expr.
2010-12-01 14:40:15 +00:00
Peter Wang
11ddb1fbc0 Fix bug #67, where mprof would abort due to multiple lines in the Prof.Decl
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).
2010-07-15 06:55:37 +00:00
Zoltan Somogyi
f73a8bf7f5 Auto-generate the code for performing higher order calls and method calls.
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.
2005-09-12 03:03:08 +00:00