[m-rev.] for review: fix foreign_decls in the LLDS grades

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 1 08:23:00 AEST 2002


On 31-Jul-2002, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> 
> Record foreign_decls in the .mh file in the LLDS grades.  This allows
> these declarations to be reused in different modules by just adding a
> foreign_import_module declaration, rather than duplicating the
> declarations using intermodule optimization.

I don't really understand the rationale here.
Could you explain in more detail?
Is this patch changing something user-visible?
If so, there should be a test case for it.

What exactly is the current status, and how does your patch compare with it?
And how does it compare with what happens for MLDS grades?

> compiler/intermod.m:
>     Don't add pragma foreign_code to .opt files until the limitation
>     with foreign_import_module documented in
>     intermod__write_intermod_info_2 is fixed.

That looks like it could cause a serious performance regression
for a lot of programs.  Is this really needed?

If it fixes a bug, then the patch should include a regression test.

> compiler/mercury_compile.m:
>     Guard the declarations output in the C file with decl_guard.  We
>     output this second copy because it uses the line numbers of the
>     source file for the declarations allowing one to debug problems more
>     easily.

The patch should include a regression test in tests/invalid
to check that the C compiler gives the correct line number for errors
in such declarations.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list