[m-dev.] for review: fix inter-module optimization bugs
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Feb 10 15:50:48 AEDT 2001
On 07-Feb-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>
> Estimated hours taken: 3
>
> Fix bugs in `:- pragma import' and `:- pragma export' with
> inter-module optimizaton reported by Peter Ross (bug #131069).
>
> compiler/mercury_to_mercury.m:
> The code to output `:- pragma import' declarations was
> writing `:- pragma import(p(Arg1::in, Arg2::out), "imported")'.
> The correct output is `:- pragma import(p(in, out), "imported")'.
>
> compiler/mercury_compile.m:
> For modules containing `:- pragma export' declarations, add
> ":- pragma c_header_code("#include ModuleName.h")." to
> the `.opt' file so the C compiler can find the function
> prototypes for Mercury predicates exported to C when
> compiling the C code in the `.opt' file.
>
> Write the `.h' file for a module when writing the `.opt' file
> when using the LLDS backend to avoid trying to use the `.h' file
> before it has been created.
That change seems to have broken things.
E.g. the nightly tests on hg failed, with `make install' dying when it
goes to install the `asm_fast' grade of the library, with
"std_util.opt:248: std_util.h: No such file or directory".
| gmake[1]: Entering directory `/home/hg/public/test_mercury/test_dirs/hg/mercury/stage2/library'
| MERCURY_INT_DIR=. MERCURY_ALL_C_INCL_DIRS=" -I../trace -I../runtime -I../boehm_gc -I../boehm_gc/include " mmc --generate-dependencies --transitive-intermodule-optimization --grade asm_fast --no-infer-all --halt-at-warn -O4 --opt-space
| library
| gmake[1]: Leaving directory `/home/hg/public/test_mercury/test_dirs/hg/mercury/stage2/library'
| gmake[1]: Entering directory `/home/hg/public/test_mercury/test_dirs/hg/mercury/stage2/library'
| gmake[1]: Nothing to be done for `install_hdrs'.
| gmake[1]: Leaving directory `/home/hg/public/test_mercury/test_dirs/hg/mercury/stage2/library'
| gmake[1]: Entering directory `/home/hg/public/test_mercury/test_dirs/hg/mercury/stage2/library'
| rm -f array.c
| MERCURY_INT_DIR=. MERCURY_ALL_C_INCL_DIRS=" -I../trace -I../runtime -I../boehm_gc -I../boehm_gc/include " mmc --compile-to-c --trace minimum --transitive-intermodule-optimization --grade asm_fast --no-infer-all --halt-at-warn -O4 --opt-space array.m > array.err 2>&1
| MERCURY_INT_DIR=. MERCURY_ALL_C_INCL_DIRS=" -I../trace -I../runtime -I../boehm_gc -I../boehm_gc/include " ../scripts/mgnuc --grade asm_fast -c array.c -o array.o
| std_util.opt:248: std_util.h: No such file or directory
| gmake[1]: *** [array.o] Error 1
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list