[m-dev.] for review: nondet stack dumps.

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Apr 6 11:54:49 AEST 1998


On 03-Apr-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Implement nondet stack dumps.
> 
> library/require.m:
> 	Call MR_dump_stack with MR_curfr.
> 
> runtime/mercury_stack_trace.c:
> runtime/mercury_stack_trace.h:
> 	Get MR_curfr as input.
> 	If we hit a nondet stack frame, handle moving down a frame a
> 	little differently.

That looks good.  I have only one small comment:

>  		if (MR_DETISM_DET_CODE_MODEL(determinism)) {
> +			fprintf(stderr, "\t%s (det stack)\n", label->e_name);
...
> +		} else if (determinism != -1) {
> +			fprintf(stderr, "\t%s (nondet stack)\n", label->e_name);

Whether a procedure uses the det stack or the nondet stack is perhaps
a fairly implementation-oriented notion.  Is it worth printing this out?
It might be better to print just the determinism of the procedure.
This would convey more information, in less space.

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



More information about the developers mailing list