[m-rev.] for post-commit review: change some arities into pred_form_arities

Julien Fischer jfischer at opturion.com
Mon Jul 3 22:53:41 AEST 2023


On Mon, 3 Jul 2023, Zoltan Somogyi wrote:

> Make some arities into pred_form_arities.
> 
> compiler/hlds_pred.m:
>     Replace the arity field in pred_infos with a pred_form_arity field.
>
>     Move the pred_info's pred_or_func field to its usual position
>     in predicate/function descriptions: at the front (pred/func name/arity).

...

> diff --git a/compiler/exception_analysis.m b/compiler/exception_analysis.m
> index c31c4ce02..3c98907ca 100644
> --- a/compiler/exception_analysis.m
> +++ b/compiler/exception_analysis.m
> @@ -470,7 +470,7 @@ check_goal_for_exceptions_plain_call(SCC, VarTable, CallPredId, CallProcId,
>              ModuleName = pred_info_module(CallPredInfo),
>              any_mercury_builtin_module(ModuleName),
>              Name = pred_info_name(CallPredInfo),
> -            Arity = pred_info_orig_arity(CallPredInfo),
> +            pred_info_get_orig_arity(CallPredInfo, pred_form_arity(Arity)),
>              ( SpecialPredId = spec_pred_compare
>              ; SpecialPredId = spec_pred_unify
>              ),
> @@ -483,10 +483,10 @@ check_goal_for_exceptions_plain_call(SCC, VarTable, CallPredId, CallProcId,
>              )
>          )
>      then
> -        % For unification/comparison the exception status depends upon the
> -        % types of the arguments. In particular whether some component of
> +        % For unifications/comparisons. the exception status depends upon the

I think you meant to put a comma there.

> +        % types of the arguments. In particular. on whether some component of

And there.

>          % that type has a user-defined equality/comparison predicate that
> -        % throws an exception.
> +        % may throw an exception.
>          module_info_get_globals(!.ModuleInfo, Globals),
>          globals.lookup_bool_option(Globals, intermodule_analysis,
>              IntermodAnalysis),

The rest looks fine.

Julien.


More information about the reviews mailing list