[m-dev.] for review: type specialisation
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Sep 2 17:53:48 AEST 1998
On 30-Aug-1998, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> Rework the handling of types in higher_order.m.
> - Fix bugs in higher_order.m that stopped it working with --typeinfo-liveness.
> - Perform type and typeclass specialisation.
...
> @@ -836,13 +1224,12 @@
> NextHOid is NextHOid0 + 1,
> string__append_list([Name0, "__ho", IdStr], PredName),
> pred_info_typevarset(PredInfo0, TypeVars),
> - remove_listof_higher_order_args(Types0, 1, HOArgs, Types),
> pred_info_context(PredInfo0, Context),
> pred_info_get_markers(PredInfo0, MarkerList),
> pred_info_get_goal_type(PredInfo0, GoalType),
> % When we start specialising class method calls, this
> - % context will need to be updated.
> - % cf. remove_listof_higher_order_args.
> + % context will need to be updated -dgj?
> + % XXX Is this needed by anything after here? -stayl
> pred_info_get_class_context(PredInfo0, ClassContext),
There might well be something that currently depends on it --
I don't know off-hand.
I think the class context here should be updated,
even if there is currently nothing that depends on it.
It will just make maintenance easier if higher_order.m preserves
type-correctness.
> + % Substitute the types in a higher_order_arg.
> +:- pred substitute_higher_order_arg(substitution::in, higher_order_arg::in,
> + higher_order_arg::out) is det.
If the argument there is supposed to be a type substitution,
please use the type `tsubst' instead of `substitution'.
Otherwise, that looks OK.
--
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