[m-rev.] for review: don't abort on :- pragma memo on non-C backends
Julien Fischer
juliensf at csse.unimelb.edu.au
Mon Jul 30 12:13:26 AEST 2007
On Fri, 27 Jul 2007, Peter Wang wrote:
> Estimated hours taken: 1
> Branches: main
>
> compiler/add_pragma.m:
> Don't add declarations or clauses for tabling statistics and tabling
> reset predicates unless the backend supports C as a foreign language.
> This prevents warnings about those predicates missing clauses on other
> backends during type checking.
>
> Rename table_info_global_var_name to table_info_c_global_var_name.
Rather than not adding the declarations it might be better to add
a clause that is equivalent to true for the reset predicate and that
calls error/1 (or whatever --allow-stubs does) for the statistics.
(Alternatively, you could just add a clause for the statistics predicate
that causes it to print out at a message that tabling statistics are
unavailable.)
I think the above behaviour is more in keeping with the fact that
memo and loopcheck pragmas are ignored in grades that don't support
tabling.
(What is the current behaviour of the C backend when --high-level-data
is enabled?)
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list