[m-rev.] for review: fix tabling for foreign enumerations
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Feb 27 19:36:20 AEDT 2008
I've committed this one.
On Wed, 30 Jan 2008, Julien Fischer wrote:
> Estimated hours taken: 2
> Branches: main
>
> Fix tabling of foreign enumerations. There are two problems: (1) the
> original runtime support for tabling foreign enumerations was wrong since it
> treated them like ordinary enumerations and (2) the runtime had got out of
> sync with the source-to-source transformation in the compiler which was
> generating code that hashed foreign enumeration values.
>
> This diff replaces the original runtime support for tabling foreign
> enumerations and separates the handling of foreign enumeration values
> from that of int values.
>
> compiler/table_gen.m:
> Call the new runtime infrastructure when tabling foreign
> enumerations.
>
> compiler/hlds_pred.m:
> Extend the type table_trie_step/0 to handle foreign enumerations.
>
> Re-order the type table_trie_step/0 so that it matches the ordering
> of table_statistics.table_step_kind/0 and MR_TableTrieStep in
> runtime/mercury_tabling.h.
>
> XXX Why does the comment above this type say that it doesn't have
> to handle dummy steps and yet the type contains a
> able_trie_step_dummy
> alternative?
>
> compiler/rtti.m:
> compiler/hlds_out.m:
> Conform to the above change.
>
> library/table_builtin.m:
> Add a new service predicate for doing table lookups or insertions
> of foreign enumeration values.
>
> library/table_statistics.m:
> Extend the type table_step_kind/0 to cover foreign enumerations.
>
> runtime/mercury_table_type_body.h:
> When doing an RTTI lookup on how to table a foreign enumeration
> value,
> don't treat it as an ordinary enumeration value.
>
> runtime/mercury_tabling.h:
> Extend MR_TableTrieStep to cover foreign enumerations.
>
> Update a reference: s/table_builtin.m/table_statistics.m.
>
> runtime/mercury_tabling_macros.h:
> runtime/mercury_tabling_pred.h:
> Define macros for tabling foreign enumeration values.
>
> tests/tabling/Mmakefile:
> Enable the foreign enumeration tabling test case.
>
> tests/tabling/.cvsignore:
> Ignore some generated files.
--------------------------------------------------------------------------
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