[m-dev.] for review: a big step towards the trace-based debugger (part 1 of 3)

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Mar 22 20:54:07 AEDT 1998


On 20-Mar-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:

code_gen.m:
> +	% Generate_category_code generates code for an entire procedure.
...
> +	% Nondet procedures have a failure continuation, but in the absence
> +	% of tracing this continuation needs no code. Only semidet procedures
> +	% need code for the failure continuation at all times.)
> +	% code_gen__generate_epilogue.
> +	%
> +	% Procedures defined by nondet pragma C codes are a special case.
> +	% Pragma_c_gen__generate_pragma_c_code handles XXX

It looks like you forgot to finish the comment there.

> -:- pred code_gen__generate_prolog(code_model, hlds_goal, frame_info, code_tree, 
> -	code_info, code_info).
> -:- mode code_gen__generate_prolog(in, in, out, out, in, out) is det.
> +:- pred code_gen__generate_entry(code_model, hlds_goal, frame_info,
> +	code_tree, code_info, code_info).
> +:- mode code_gen__generate_entry(in, in, out, out, in, out) is det.

Any particular reason for this name change?

> -code_gen__generate_epilog(CodeModel, FrameInfo, EpilogCode) -->
> +code_gen__generate_exit(CodeModel, FrameInfo, RestoreDeallocCode, EpilogCode)
> +		-->
>  	{ StartComment = node([
>  		comment("Start of procedure epilogue") - ""
>  	]) },
> @@ -554,6 +634,7 @@
>  				will_not_call_mercury, no)
>  				- ""
>  		]) },
> +		{ RestoreDeallocCode = empty }, % XXX

You should include a comment explaining the XXX.

> Index: compiler/continuation_info.m

... to be continued.

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