[m-dev.] Diff: bug fix in inlining.m

Fergus Henderson fjh at cs.mu.oz.au
Fri Jun 6 13:35:13 AEST 1997


Andrew Bromage, you wrote:
> 
> Bug fix to inlining.m.
> 
> When you inline a proc whose inferred determinism differs from the
> declared determinism, re-run determinism analysis to ensure that
> they are not misleading.  This caused the code generator to abort
> on the regression test included.

> +		% Re-run determinism analysis if we have to.
> +	( DetChanged = yes,	
> +		determinism_check_proc(ProcId, PredId, ModuleInfo1, ModuleInfo,
> +			IoState0, IoState)
> +	; DetChanged = no,
> +		ModuleInfo = ModuleInfo1,
> +		IoState = IoState0
> +	).

Hmm... won't the call to determinism_check_proc potentially emit
determinism warnings?

I think you should call det_infer_proc instead.
(That would require exporting det_infer_proc, and hence documenting it.)

Also, after the comment

		% Take the worst of the old and new detisms.
		% This is needed to prevent loops on p :- not(p)
		% at least if the initial assumed detism is det.

in det_infer_proc, can you please add a comment

		% This may also be needed to ensure that we don't change
		% the interface determinism of procedures, if we are
		% re-running determinism analysis.

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