[m-rev.] trivial diff: more comment fixes
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jan 10 21:44:42 AEDT 2003
Estimated hours taken: 0.25
Branches: main
Trivial comment changes.
compiler/inst_match.m:
Update some obsolete comments to match the current interface.
Add a comment about contravariance/covariance in
pred_inst_argmodes_matches.
compiler/java_util.m:
compiler/notes/compiler_design.html:
Fix typos.
Workspace: /home/ceres/fjh/mercury
Index: compiler/inst_match.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/inst_match.m,v
retrieving revision 1.50
diff -u -d -r1.50 inst_match.m
--- compiler/inst_match.m 20 Mar 2002 12:36:24 -0000 1.50
+++ compiler/inst_match.m 25 Nov 2002 07:45:46 -0000
@@ -645,9 +645,12 @@
Info0 = init_inst_match_info(ModuleInfo),
pred_inst_matches_2(PredInstA, PredInstB, MaybeType, Info0, _).
- % pred_inst_matches_2(PredInstA, PredInstB, ModuleInfo, Expansions)
- % Same as pred_inst_matches/3, except that inst pairs in
- % Expansions are assumed to match_final each other.
+ % pred_inst_matches_2(PredInstA, PredInstB, Info0, Info)
+ %
+ % Same as pred_inst_matches/3, except that it updates
+ % the inst_var_sub in the inst_match_info, and that any
+ % inst pairs in Info0^expansions are assumed to
+ % match_final each other.
% (This avoids infinite loops when calling inst_matches_final
% on higher-order recursive insts.)
%
@@ -662,13 +665,18 @@
MaybeTypes) },
pred_inst_argmodes_matches(ModesA, ModesB, MaybeTypes).
- % pred_inst_matches_argmodes(ModesA, ModesB, ModuleInfo, Expansions):
+ % pred_inst_argmodes_matches(ModesA, ModesB, Info0, Info):
+ %
% succeeds if the initial insts of ModesB specify at least as
% much information as, and the same binding as, the initial
% insts of ModesA; and the final insts of ModesA specify at
% least as much information as, and the same binding as, the
- % final insts of ModesB. Any inst pairs in Expansions are assumed
- % to match_final each other.
+ % final insts of ModesB. Any inst pairs in Inst0^expansions
+ % are assumed to match_final each other.
+ %
+ % (In other words, as far as subtyping goes it is contravariant in
+ % the initial insts, and covariant in the final insts;
+ % as far as binding goes, it is invariant for both.)
%
:- pred pred_inst_argmodes_matches(list(mode), list(mode), list(maybe(type)),
inst_match_info, inst_match_info).
Index: compiler/java_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/java_util.m,v
retrieving revision 1.6
diff -u -d -r1.6 java_util.m
--- compiler/java_util.m 20 Mar 2002 12:36:27 -0000 1.6
+++ compiler/java_util.m 21 Oct 2002 08:24:54 -0000
@@ -9,7 +9,7 @@
% This module defines utility routines that are used by the
% Java backend. Much of the code below is similar to that in c_util.m;
-% changes made to this module may require changes c_util.m.
+% changes made to this module may require changes to c_util.m.
%-----------------------------------------------------------------------------%
@@ -76,7 +76,6 @@
%-----------------------------------------------------------------------------%
-
% Tags are not used in the Java back-end, as such, all of the tagging
% operators except for `tag' return no-ops. The `tag' case is handled
% seperately in mlds_to_java__output_std_unop.
@@ -129,6 +128,7 @@
java_util__binary_infix_op(<=, "<=").
%------------------------------------------------------------------------------%
+
java_util__is_keyword("abstract").
java_util__is_keyword("boolean").
java_util__is_keyword("break").
Index: compiler/notes/compiler_design.html
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.80
diff -u -d -r1.80 compiler_design.html
--- compiler/notes/compiler_design.html 22 Nov 2002 13:41:55 -0000 1.80
+++ compiler/notes/compiler_design.html 1 Dec 2002 15:28:05 -0000
@@ -538,7 +538,7 @@
or (b) repeated calls to a predicate with the same inputs, and replaces
them with assignment unifications.
simplify.m also attempts to partially evaluate calls to builtin
- procedures if the inputs are all constants (see const_prop.m),
+ procedures if the inputs are all constants (see const_prop.m).
</dl>
--
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