[m-rev.] for review: IL back-end: use value types for environments

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jul 15 06:31:47 AEST 2001


On 14-Jul-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 14-Jul-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 
> > For the IL back-end, use value types rather than class types
> > for the environment structures used for nondeterministic code.
> 
> This doesn't work, because you can't use `refany' types as fields of structures.
> 
> We had the same problem with ordinary managed reference types, and worked around
> that by putting a value rather than a reference in the environment struct,
> and using copy-in copy-out.
> 
> But that work-around won't help here, since there's no generic type we can use
> for the value.
> 
> :-(

Plan B is to use unmanaged pointers rather than 'refany'.

(Still not 100% sure if this plan is feasible,
since I haven't implemented it yet.)

This will of course be completely unverifiable.
So it ought to be optional, with the other option being to
allocate nondet environments on the heap (as we do currently).

A third option would be to use `refany', in case the underlying CLI
implementation supports `refany' fields of structs.  However,
not much point in that until there is a CLI that supports it...

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