[m-rev.] for post-commit review: item_seq_num

Julien Fischer jfischer at opturion.com
Wed May 19 17:13:51 AEST 2021


On Wed, 19 May 2021, Zoltan Somogyi wrote:

> For review by anyone.

> Switch to structured item sequence numbers.
> 
> compiler/prog_data.m:
>     Define a data type that encodes the distinction between valid
>     and dummy item sequence numbers in the type. Previously, different
>     parts of the compiler expressed this distinction in two different ways,
>     either using "-1" to represent a dummy sequence number, or using "no"
>     in a maybe(int) type.
> 
> compiler/prog_item.m:
>     Use the new type instead of plain "int" as the sequence number in items.
> 
> compiler/hlds_pred.m:
>     Use the new type instead of plain "int" as the sequence number
>     in cur_user_decl_infos. Document the fact that the presence of a
>     cur_user_decl_info in a pred_info does NOT guarantee a valid
>     item sequence number.
> 
> compiler/add_foreign_proc.m:
>     When adding a foreign_proc to the HLDS, pass a whole item_pragma_info,
>     not its components. (This change is what this diff started as, before
>     the item_seq_num changes overwhelmed it.)

That's fine.

Julien.


More information about the reviews mailing list