[m-dev.] for review: rewrite of duplicate elimination.

Tyson Dowd trd at cs.mu.oz.au
Mon Dec 22 20:07:47 AEDT 1997


On 22-Dec-1997, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> On 22-Dec-1997, Tyson Dowd <trd at cs.mu.oz.au> wrote:
> > > compiler/llds_out.m:
> > > 	If the first arg of the lval field/3 is no, emit a (const_)mask_field
> > > 	macro; otherwise, emit a (const_)field macro.
> > 
> > The maybe doesn't convey the meaning very well. I'd prefer
> > 	:- type field_remove ---> tag(int) ; mask.
> > or something similar. 
> 
> Hmm. The first arg of field/3 specifies the tag, if known.
> I suppose you could argue for
> 
>  	:- type tag_known ---> known_tag(int) ; unknown_tag.
> 
> but personally I think using `maybe' is adequate.

Oh, the present mechanism is adequate. I just hate looking
through llds manipulating code and seeing "yes" and "no" all
over the place, and not knowing immediately what they mean. It's worse
if the variable names are MaybeTypeName. (This is not a particularly
bad case).

-- 
       Tyson Dowd           # If I'm unusually agressive in this email, it's
                            # probably because USENET has been down here for
     trd at cs.mu.oz.au        # over a week, and I'm missing my usual dosage
http://www.cs.mu.oz.au/~trd # of flamewars. My apologies in advance.



More information about the developers mailing list