[m-rev.] for possible post-commit review: check tabling pragmas early

Julien Fischer jfischer at opturion.com
Mon Aug 17 17:28:22 AEST 2026


On Mon, 17 Aug 2026 at 16:35, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Move tabling pragma checks earlier.
>
> compiler/add_pragma_tabling.m:
>     Move checks on tabling pragmas here from table_gen.m. Both
>     because this is where they belong, and because this should
>     simplify their interaction with input_spec pragmas.
>
>     The moved code is *mostly* unchanged.
>
> compiler/handle_options.m:
>     Predicates that do I/O are subject to I/O tabling *without*
>     a tabling pragma, in grades that support mdb debugging.
>     Move the checks on I/O tabling here from table_gen.m.
>
>     Executing the tests here once per compiler invocation,
>     instead of once per I/O predicate in table_gen.m, means that
>     the tests run even if the module contains *no* I/O predicates.
>     This may look excessive, but
>
>     - the only inputs to these tests are grade components,
>       which must be consistent across modules, and
>
>     - a useful program must contain modules that *do* perform I/O.
>
> compiler/table_gen.m:
>     Delete the moved code.
>
> tests/valid/Mmake.valid.common:
>     Do not perform the tests that specify --gc accurate
>     in debug grades, since the new code in handle_options.m
>     would make them fail.

That's fine.

Julien.


More information about the reviews mailing list