for review: stack layouts for execution tracing
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jan 25 14:44:44 AEDT 1998
On 25-Jan-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > > +code_gen__generate_lvaltypes(Vars, Lvals, LvalTypes, TypeInfos) -->
> > > + code_info__get_instmap(InstMap),
> > > + list__map_foldl(code_info__variable_type, Vars, Types),
> > > + { list__map(instmap__lookup_var(InstMap), Vars, Insts) },
> > > + { assoc_list__from_corresponding_lists(Types, Insts,
> > > + TypeInsts) },
> > > + { list__map(lambda([TypeInst::in, LiveType::out] is det, (
> > > + TypeInst = Type - Inst,
> > > + LiveType = var(Type, Inst))),
> > > + TypeInsts, LiveTypes) },
> >
> > It may be worthwhile adding a new predicate to assoc_list.m that
> > invokes a user-supplied predicate for each pair of list elements,
> > instead of wrapping them up inside a pair, before putting the result
> > into the zipped list.
>
> As Fergus noted in mercury-developers, it might be better to make the
> compiler optimize this case away instead.
If you see my latest comment on the other thread,
I think Zoltan's suggestion above was a good one,
except that I think it should go in list.m rather than assoc_list.m.
--
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