[m-rev.] for review: fix expand equivalence type for special preds bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Nov 9 04:35:53 AEDT 2002
On 08-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> fjh wrote:
> > > compiler/rtti.m:
> > > Record the the actual argument types for a special predicate
> > > in the rtti_proc_label type.
> >
> > What was the rationale for this bit of the change?
>
> Because the expanded types are needed in ml_gen_proc_params_from_rtti.
Oh, I see. I was confused by your terminology change from
"actual argument types" to "expanded argument types".
> > > compiler/ml_call_gen.m:
> > > compiler/ml_closure_gen.m:
> > > compiler/ml_code_gen.m:
> > > compiler/ml_code_util.m:
> > > Use the types where all the equivalence types have been
> > > eliminated.
> > >
> > > compiler/type_util.m:
> > > Add a utility predicate to expand out equivalence types.
> >
> > Hmm. Expanding these on the fly all the time seems like it could be
> > a bit inefficient (as far as compile time is concerned).
>
> The results of the expansion could be cached in pred_info and proc_info
> structures,
That would probably be worse -- the memory size increase for the
extra field would probably slow things down considerably.
I don't see a better solution off-hand. But it might be a good idea to
measure the effect of your patch on compilation time, so that we know
whether this is worth worrying about.
--
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