[m-dev.] for review: remove "optimisation" in check_typeclass.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Jun 8 17:42:09 AEST 1998
On 08-Jun-1998, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> Disable the often erroneous "optimisation" in check_typeclass.m whereby we
> skipped the level of indirection for instance methods if there was an exact
> match for the types, modes and determinisms of the instance method.
> Consequently rip out lots of useless stuff from check_typeclass.m.
>
> Also, for methods which are functions, introduce unifications for the body
> rather than calls.
The log message should include
Also improve a couple of error messages slightly.
You should fix the missing whitespace in the new error messages
(as we discussed).
> + PredOrFunc = function,
> + (
> + FuncArity is PredArity - 1,
> + list__split_list(FuncArity, HeadVars, RealHeadVars0,
> + [ReturnVar0])
> + ->
> + ReturnVar = ReturnVar0,
> + RealHeadVars = RealHeadVars0
> + ;
> + error("function has no return value")
> + ),
As we discussed, you should use `pred_args_to_func_args' from hlds_pred.m.
Otherwise that looks fine.
--
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