[m-rev.] for review: centralize adding items in make_hlds_passes.m.

Julien Fischer jfischer at opturion.com
Tue May 25 17:11:25 AEST 2021



On Mon, 24 May 2021, Zoltan Somogyi wrote:

> I propose to move to prog_mutable.m
>
> - the predicate mutable_public_aux_pred_decls now in
>  comp_unit_interface.m, and
>
> - everything in add_mutable_aux_preds.m that constructs
>  the declarations and definitions of predicates and the foreign
>  code fragments that support them. This means everything
>  from about line 540 to about line 1650 (after this recent diff).
>
> The code of check_mutable would remain in add_mutable_aux_preds.m,
> because the construction of the error messages needs the HLDS.
> This means that its caller would have to stay in the module too.
> That call would be moved to the implement_mutables_loop predicate,
> which would also stay, along with its own ancestor.
>
> The interface of prog_mutable.m would go from about ten
> exported functions and predicates to just two, one each
> for comp_unit_interface.m and the rump add_mutable_aux_preds.m.
> And its implementation section could be reordered to finally put
> the declaration of each aux pred next to its implementation,
> instead of being in different modules.
>
> I also propose to move the huge initial comment that describes
> the target code we want to generate for various kinds of mutables
> to a file in compiler/notes, with a mention at the top of prog_mutable.m.
> Having that info available is nice, but having to jump over it
> every time you start editing a source file gets old very fast.
>
> Any opinions, or objections?

No objections from me.

Julien.


More information about the reviews mailing list