[m-rev.] for review: fix bug with impure lambda expressions

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Aug 11 15:43:48 AEST 2005


On Thu, 11 Aug 2005, Zoltan Somogyi wrote:

> On 11-Aug-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > I don't think the predicates in arg_info.m are all that related; in
> > particular most of the code there is used in later stages of
> > compilation.  It doesn't seem to need to deal with the possibility of
> > undefined modes.  Unless you feel strongly that this test belongs in
> > arg_info.m, I'm going to leave it here.
>
> Fine, but please put a comment at the top of arg_info.m pointing readers
> to this predicate and how it differs from the ones in arg_info.m.
>
Ok.  I've update the log message as well.

Index: arg_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/arg_info.m,v
retrieving revision 1.45
diff -u -r1.45 arg_info.m
--- arg_info.m	8 Aug 2005 02:57:08 -0000	1.45
+++ arg_info.m	11 Aug 2005 05:42:21 -0000
@@ -15,6 +15,12 @@
 % argument is input/output/unused, and which register it is supposed to
 % go into.

+% The code in this module assumes that none of the modes are undefined.  The
+% predicates for partitioning arguments into input, unused and output should
+% not be used before undefined modes have been detected.  For an example of
+% how this kind of partitioning can be done in the presence of undefined modes,
+% see superhomogeneous.partition_args_and_lambda_vars/8.
+
 %-----------------------------------------------------------------------------%

 :- module hlds__arg_info.
--------------------------------------------------------------------------
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