[m-rev.] for post-commit review: stop using prog_varsets in MLDS backend

Julien Fischer jfischer at opturion.com
Sun May 15 14:52:10 AEST 2022


On Sun, 15 May 2022, Zoltan Somogyi wrote:

> Stop using varsets/vartypes in the MLDS backend.
> 
> compiler/ml_args_util.m:
> compiler/ml_closure_gen.m:
> compiler/ml_code_util.m:
> compiler/ml_proc_gen.m:
>     As above.
> 
> compiler/hlds_pred.m:
>     The code in the MLDS code generator that handles calls reuses
>     some code in ml_args_util.m that it uses for the clause head,
>     and thus derived the names of some MLDS variables from the
>     varset of the callee. In the case where the callee is a unify
>     or compare predicate for an imported type, the varset contained
>     the names of the argument variables, but not their type. This means
>     that looking up their names in the var_table instead of the varset
>     requires the var_table to contain every variable that the varset contains,
>     so change the code that constructs the var_table to ensure this.
>
>     Add a var_table version of another predicate to prepare for a future
>     change.
> 
> tests/invalid/try_detism.err_exp:
>     Update the variable number of an unnamed variable after the changes
>     in hlds_pred.m.

That's fine.

Julien.


More information about the reviews mailing list