[m-rev.] for review: delete num_errors field of module_info

Julien Fischer jfischer at opturion.com
Sat Jan 15 16:32:08 AEDT 2022


On Sat, 15 Jan 2022, Zoltan Somogyi wrote:

> Stop counting errors in module_infos.
> 
> Over time, we have almost completely switched over to using error_specs,
> using their severity (if not yet printed out) and their effect on the
> exit status (if already printed out) to represent the presence of errors,
> leaving only a few places that either updated or paid attention to the
> num_error field in the module_info. This diff completes that process.
> 
> compiler/hlds_module.m:
>     Delete the num_errors field in the module_info, and the predicates
>     that operate on it.
> 
> compiler/hlds_error_util.m:
>     Delete module_info arguments whose only purpose was to update the
>     now-delete field.
> 
> compiler/error_util.m:
>     Delete the old write_error_spec predicates that updated a count of warnings
>     and a count of errors.
>
>     Rename the write_error_spec_ignore predicates, which ignored those counts,
>     by deleting the "_ignore" from their names. This makes them take the
>     place of the deleted predicates.

That's fine.

Julien.


More information about the reviews mailing list