[m-rev.] Re: for review: default modes for higher-order func insts

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 10 15:37:36 AEST 2001


On 10-Oct-2001, David Overton <dmo at cs.mu.OZ.AU> wrote:
> > > compiler/inst_match.m:
> > > 	In 'inst_matches_initial' and 'inst_matches_final', ensure that higher
> > > 	order inst information is not lost from non-standard function insts.
> > > 	Also allow 'inst_matches_{initial,final,binding}' to succeed
> > > 	where the first inst is a standard function inst and the
> > > 	second is ground.
> > 
> > I think you should also add some comments to inst_is_ground explaining
> > what it does for non-standard function insts, and why.  Currently it
> > succeeds, which I think is the right thing for most callers, but not for
> > all.  There is at least one place where this issue with inst_is_ground
> > leads to a bug with your current diff because of somewhere that
> > you didn't change.
> 
> done.

Could you be more specific?
Do you mean you added the comments, or you fixed the bug, or both?
Which place had the bug?

> > You need go through every call to inst_is_ground and see whether it
> > is OK for each call to succeed for non-standard function insts.  This will
> > require searching up the call graph in some cases (e.g. you'll need to
> > look at all callers of mode_is_fully_input and mode_is_fully_output).
> 
> done.

Did you modify any of the callers of mode_is_fully_input or
mode_is_fully_output?  I didn't see that in the relative diff.

> +++ tests/invalid/Mmakefile
> @@ -47,6 +47,7 @@
>  	func_errors.m \
>  	funcs_as_preds.m \
>  	ho_default_func_1.m \
> +	ho_default_func_3.m \
>  	ho_type_mode_bug.m \
>  	ho_unique_error.m \
>  	impure_method_impl.m \

You didn't post the new files ho_default_func_3.m and
ho_default_func_3.err_exp.

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