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

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 12 14:43:12 AEDT 2002


On 12-Nov-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 12-Nov-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > There should be a comment here explaining that the IL definitions 
> > are dummy definitions (and why).
> 
> OK.
> 
> > What is the Mercury definition for?  I don't really understand why you
> > need both the il and the Mercury definitions.
> 
> It is also a dummy, to make the module compile with --target java.

That explains why you need the Mercury definition, but not why you
need the il definition.

> > Will this change cause any problems in ".rt" (--reserve-tag) grades?
> 
> No. From Mercury, the type is an abstract type; its values are not manipulated
> by Mercury-generated C code, only by hand-written C code.

The type has a type_ctor_info which can be referred to from other modules.
Other modules can call unify, compare, or std_util__deconstruct for
values of this type.  Such calls will fail in ".rt" grades, I believe.

> > 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.
> 
> The debugger works only with a C backend, which won't use the Mercury
> definition.

Are you sure that the debugger will never call io__print_cc on such values,
thus accessing the (incorrect in ".rt" grades) type_ctor_info?

-- 
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