[m-rev.] for review: fix mantis bug 541

Julien Fischer jfischer at opturion.com
Mon Jan 3 01:00:11 AEDT 2022


On Mon, 3 Jan 2022, Zoltan Somogyi wrote:

> Don't apply unused_args to unsuitable preds/procs.

...

> @@ -468,6 +488,68 @@ setup_proc_args(PredId, ProcId, !VarUsage, !PredProcIds, !OptProcs,
>                  % not compatible with each other.
>                  proc_info_get_eval_method(ProcInfo, EvalMethod),
>                  EvalMethod \= eval_normal
> +            ;
> +                proc_info_get_declared_determinism(ProcInfo,
> +                    MaybeDeclaredDetism),
> +                proc_info_get_goal(ProcInfo, Goal),
> +                Goal = hlds_goal(_, GoalInfo),
> +                ActualDetism = goal_info_get_determinism(GoalInfo),
> +                % If there is a declared detism but the actual detism
> +                % differs from it, then replacing the Goal in ProcInfo
> +                % with a forwarding call to the clone of this procedure
> +                % in which the unused args have been eliminated
> +                % can set cause simplification to screw up.

Delete the word "set" there.

That looks fine otherwise.

Julien.


More information about the reviews mailing list