[m-dev.] trivial diff: fix bugs in my last change
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Jul 10 18:51:29 AEST 1999
On 10-Jul-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> compiler/mercury_compile.m:
> Add import of mlds.m, to ensure that it will get compiled,
> so as to avoid problems like the one above in future.
Oops, I really ought to at least compile these things before committing them.
----------
Estimated hours taken: 0.25
Fix some compilation errors that were introduced in my last change.
The errors were ambiguities in mercury_compile.m caused by names defined
in mlds.m being the same as those defined in other modules.
compiler/merucry_compile.m:
s/label/llds__label/
compiler/mlds.m:
s/mlds__module_name/mlds_module_name/g
cvs diff compiler/mercury_compile.m compiler/mlds.m
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.132
diff -u -r1.132 mercury_compile.m
--- mercury_compile.m 1999/07/10 07:59:04 1.132
+++ mercury_compile.m 1999/07/10 08:44:44
@@ -2168,8 +2168,9 @@
Num1 is Num + 1,
mercury_compile__combine_chunks_2(Chunks, ModuleName, Num1, Modules).
-:- pred mercury_compile__output_llds(module_name, c_file, set_bbbtree(label),
- maybe(rl_file), bool, bool, io__state, io__state).
+:- pred mercury_compile__output_llds(module_name, c_file,
+ set_bbbtree(llds__label), maybe(rl_file), bool, bool,
+ io__state, io__state).
:- mode mercury_compile__output_llds(in, in, in, in, in, in, di, uo) is det.
mercury_compile__output_llds(ModuleName, LLDS0, StackLayoutLabels, MaybeRLFile,
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.2
diff -u -r1.2 mlds.m
--- mlds.m 1999/07/10 07:59:04 1.2
+++ mlds.m 1999/07/10 08:41:37
@@ -246,15 +246,15 @@
% Currently an import just gives the name of the package to be imported.
% This might perhaps need to be expanded to cater to different kinds of
% imports, e.g. imports with wild-cards ("import java.lang.*").
-:- type mlds__import == mlds__module_name.
+:- type mlds__import == mlds_module_name.
% Specifies the name of a package or
% class to import.
-% An mlds__module_name specifies the name of an mlds package or class.
-:- type mlds__module_name.
+% An mlds_module_name specifies the name of an mlds package or class.
+:- type mlds_module_name.
% An mlds__package_name specifies the name of an mlds package.
-:- type mlds__package_name == mlds__module_name.
+:- type mlds__package_name == mlds_module_name.
% Given the name of a Mercury module, return the name of the corresponding
% MLDS package.
@@ -281,7 +281,7 @@
% in identifiers, then it is the responsibility of the target language
% generator to mangle these names accordingly.
:- type mlds__fully_qualified_name(T)
- ---> qual(mlds__module_name, T).
+ ---> qual(mlds_module_name, T).
:- type mlds__qualified_entity_name
== mlds__fully_qualified_name(mlds__entity_name).
@@ -811,7 +811,7 @@
; internal(mlds__qualified_proc_label, mlds__func_sequence_num).
:- type mlds__data_addr
- ---> data_addr(mlds__module_name, mlds__data_name).
+ ---> data_addr(mlds_module_name, mlds__data_name).
% module name; which var
:- type mlds__data_name
@@ -910,7 +910,7 @@
% e.g. `mercury.builtin', `mercury.io', `mercury.std_util', etc.,
% when mapped to MLDS package names.
-:- type mlds__module_name == prog_data__module_name.
+:- type mlds_module_name == prog_data__module_name.
mercury_module_name_to_mlds(MercuryModule) = MLDS_Package :-
(
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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