[m-rev.] for review: native types in table_builtin.m

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 12 04:15:36 AEDT 2002


On 08-Nov-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> library/table_builtin.m:
> 	Represent trie nodes and answer lists with the right C types.
> 	Remove the casts that this change renders unnecessary.
> 
> 	Supply dummy definitions for the .NET and Java backends, which
> 	do not yet have the runtime support for tabling anyway.
...
> Index: library/table_builtin.m
> -:- type ml_table == c_pointer.
> +:- type ml_table --->	ml_table(c_pointer).
> +:- pragma foreign_type("C", ml_table, "MR_TrieNode").
> +:- pragma foreign_type(il,  ml_table, "class [mscorlib]System.Object").
> +
> +:- type ml_answer_list --->	ml_answer_list(c_pointer).
> +:- pragma foreign_type("C", ml_answer_list, "MR_AnswerList").
> +:- pragma foreign_type(il,  ml_answer_list, "class [mscorlib]System.Object").

There should be a comment here explaining that the IL definitions 
are dummy definitions (and why).

What is the Mercury definition for?  I don't really understand why you
need both the il and the Mercury definitions.

Will this change cause any problems in ".rt" (--reserve-tag) grades?
Attempting to unify or deconstruct values of these types
(e.g. to print them in the debugger) won't work in ".rt" grades
if the Mercury type definition is used.

Apart from those issues, this change looks fine (for the main branch only).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list