[m-dev.] for review: fix inter-module optimization bugs

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 12 00:39:52 AEDT 2001


On 07-Feb-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> +			% XXX Normally with `--split-c-files,
> +			% `get_header_file_include_string'
> +			% will return "#include ../ModuleName.h"
> +			% We can't explicitly look for `../ModuleName.h'
> +			% here because the `.opt' file might be part
> +			% of a library, so we need to use the
> +			% include path to find the header file.
> +			%
> +			% I'm not sure why we ever explicitly need the `../'.
> +			% The parent directory should always be in the
> +			% include path.

I tried doing some archaeology in the cvs logs and mailing list
archives to find out why that code was added.  Although the code
is now in mercury_compile.m, it was originally added to llds.m, and
then later moved to llds_out.m and then mercury_compile.m.
Unfortunately when it was added to llds.m, the log message was
incomplete,

 | revision 1.180
 | date: 1996/04/22 19:15:34;  author: dgj;  state: Exp;  lines: +117 -76
 | Estimated hours taken: 35 (?)
 | 
 | Its....
 | 
 | The C to Mercury interface.
 | 
 | 
 | <directory>/<file>:
 |         <detailed description of changes>

since it didn't list the changes to specific files.
I think dgj was new to cvs at the time.

Furthermore our email archives of mercury-developers only go back to
'97, so they weren't any help either.

But the fact that this code was added so long ago is in itself enough
to explain it: this code predates the addition of `-I.'
to the C compiler flags for `--split-c-files', which was
only added in 1998.

In other words, I don't think the `../' should be needed anymore.

-- 
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