[m-rev.] for review: --warn-non-tail-recursion

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 13 02:58:02 AEDT 2002


On 12-Feb-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> On Tue, Feb 12, 2002 at 12:58:58AM +1100, Fergus Henderson wrote:
> > +:- type tailcall_warning ---> tailcall_warning(
> > +		mlds__pred_label,
> > +		% XXX perhaps we should also include the proc_id here
> > +		mlds__context
> > +	).
> 
> Well as I see it the advantage of including the proc_id is that it would
> allow one to report which mode is non tail recursive.  I think this
> would be useful information as not all modes of a procedure will be tail
> recursive.  So I suggest that you do it.

Since we don't have the HLDS around at this point,
I can only report which mode number, not which mode.
(i.e. I'll have to report something like
`In mode number 1 of predicate foo', rather than `In foo(in, out)').

Should mode numbers start from zero or one?
I think that most users will expect mode number 1 to be the first mode,
so they should start from one.  But that is different to how they
are handled in the Mercury debugger, and in the mangled symbol names.

> Apart from the comment about the proc_id, this looks fine and I know
> there have been times I would have found it useful.

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