[m-rev.] for review: get and set varset and vartypes together

Julien Fischer jfischer at opturion.com
Thu Apr 7 19:23:07 AEST 2022


On Thu, 7 Apr 2022, Zoltan Somogyi wrote:

> Get and set varsets/vartypes in proc_infos together.
> 
> compiler/hlds_pred.m:
>     We eventually want to replace the varset and vartypes fields in
>     each proc_info with a var_table, but it is not practical to do so
>     at once; it will have to be done gradually, a few modules at most
>     at a time. During this process, we will need a way either
>
>     - to let already converted modules get a var_table out of the proc_info,
>       and put an updated var_table back into a proc_info, even though
>       proc_infos still contain varset and vartypes fields, or
>
>     - to let not-yet-converted modules get varsets and vartypes out of the
>       proc_info, and put updated varsets and vartypes back into a proc_info,
>       even though proc_infos already store a var_table.
>
>     The latter cannot be done in two halves (i.e. set the varset half
>     of the var_table, and then set its vartypes half), and while the former
>     *can* be done that way, it is more efficient to do them at the same time.
>
>     Therefore as a first step, this diff replaces the indiviual getter
>     and setter predicates of the varset and vartypes fields of proc_info
>     with a getter that gets both and a setter that sets both.
>
>     Put the varset and vartypes next to each other in a structure.

..

That's fine.

Julien.


More information about the reviews mailing list