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

Fergus Henderson fjh at cs.mu.oz.au
Mon Dec 22 19:54:41 AEDT 1997


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.

> Is there any need for the previous mechanism to remain? 
> Once you are going to do a field, it doesn't matter what the
> tag is (unless the masking operation is slower than the subtraction).

It is.  That's the reason.

> If the old mechanism is only kept for performance reasons, this should
> be documented.

Yep.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list