[m-dev.] for review: line numbers in interface files
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon May 10 14:17:08 AEST 1999
compiler/modules.m:
Do not put line numbers into the generated interface files,
even if the --line-numbers option is on. If we do, then even
a change to a source file that does not materially affect the
module's interface may cause other modules to be recompiled,
because the line numbers in the interface file may change.
Zoltan.
cvs diff: Diffing .
Index: modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.97
diff -u -b -u -r1.97 modules.m
--- modules.m 1999/04/23 01:02:53 1.97
+++ modules.m 1999/05/10 02:41:17
@@ -481,10 +481,10 @@
:- implementation.
:- import_module llds_out, passes_aux, prog_out, prog_util, mercury_to_mercury.
:- import_module prog_io_util, globals, options, intermod, module_qual.
-:- import_module term, varset.
:- import_module string, set, map, term, varset, dir, library.
:- import_module assoc_list, relation, char, require.
+:- import_module getopt, term, varset.
%-----------------------------------------------------------------------------%
@@ -949,7 +949,8 @@
%-----------------------------------------------------------------------------%
-:- pred write_interface_file(module_name, string, item_list, io__state, io__state).
+:- pred write_interface_file(module_name, string, item_list,
+ io__state, io__state).
:- mode write_interface_file(in, in, in, di, uo) is det.
write_interface_file(ModuleName, Suffix, InterfaceItems) -->
@@ -967,7 +968,10 @@
{ InterfaceDeclaration = module_defn(VarSet, interface) - Context },
{ InterfaceItems1 = [InterfaceDeclaration | InterfaceItems] },
+ globals__io_lookup_bool_option(line_numbers, LineNumbers),
+ globals__io_set_option(line_numbers, bool(no)),
convert_to_mercury(ModuleName, TmpOutputFileName, InterfaceItems1),
+ globals__io_set_option(line_numbers, bool(LineNumbers)),
update_interface(OutputFileName).
% invoke the shell script `mercury_update_interface'
cvs diff: Diffing notes
--------------------------------------------------------------------------
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