[m-dev.] Type info convention

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Nov 18 00:42:35 AEDT 2000


On 17-Nov-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> The work done by Simon on the type spec change causes a few problems for
> structure reuse.  This is because type_info's are a `hidden' type, ie
> they don't appear in mode declarations. 

The polymorphism pass adjusts the mode declarations in the HLDS
so that they include type_infos.

> Simons latest changes places
> some new type infos at the end of the headvars, making it very hard to
> determine which headvars are `real'.

Could you be more specific?  Which change of Simon's?
Have you got a simple example program which demonstrates this?

Type_infos with type `private_builtin:type_info' are compiler-introduced.
Type_infos with type `std_util:type_desc' are "real".

But why do you care?

> Simon would it be possible to change this so that the type infos are
> placed at the head of the list?  How much work would it be?
> 
> I think we should obey the convention that any head var which doesn't
> have an explicit mode declaration should go at the start of the
> headvars.

That might be reasonable.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list