[m-dev.] for review: add types to MLDS statements

Tyson Dowd trd at cs.mu.OZ.AU
Tue Mar 28 15:33:51 AEST 2000


On 27-Mar-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 27-Mar-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > On 26-Feb-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > Apart from that, this change looks fine.
> > > But I'd like to see a diff or relative diff
> > > for the change to make `cast' an mlds__unary_op
> > > rather than an mlds__stmt.
> > 
> > I've finally got around to cleaning this diff up again.
> > 
> > A relative diff is below (generated somewhat manually).
> > Below that I've attached the entire change for later reference.
> 
> >  :- type mlds__unary_op
> >  	--->	box(mlds__type)
> >  	;	unbox(mlds__type)
> > +	;	cast(mlds__type)
> >  	;	std_unop(builtin_ops__unary_op).
> 
> You should consider also including the source type,
> not just the destination type, in a `cast' mlds__unary_op.
> This is not needed for the C back-end, but it might be needed
> for compiling to other target languages.
> 
> Apart from that, this looks fine.

I'll add a comment about this.  Usually the source type is available to
the code generator, but it might be nice to have it.

The whole issue of putting types into the mlds is a little hodge-podge.
It will probably need re-addressing later when we understand the targets
a bit better.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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