[m-dev.] for review: Aditi updates[2]
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Jun 26 20:34:28 AEST 1999
> Index: compiler/hlds_pred.m
> + % We internally store the arity as the length of the argument
> + % list, which is one more than the arity of a function reported
> + % in error messages.
> +:- pred adjust_func_arity(pred_or_func, int, int).
> +:- mode adjust_func_arity(in, in, out) is det.
> +:- mode adjust_func_arity(in, out, in) is det.
I think the comment here ought to mention the words "return value"
somewhere, to explain why the arity of functions needs to be adjusted.
> Index: compiler/lambda.m
> @@ -476,8 +493,10 @@
> ModuleInfo)
> ),
> Functor = functor(cons(PredName, NumArgVars), ArgVars),
> - ConsId = pred_const(PredId, ProcId),
> - Unification = construct(Var, ConsId, ArgVars, UniModes).
> + ConsId = pred_const(PredId, ProcId, EvalMethod),
> +
> + Unification = construct(Var, ConsId, ArgVars, UniModes,
> + no, cell_is_unique, no).
The meaning of the `no's here is unclear.
> Index: compiler/magic_util.m
> @@ -487,7 +470,8 @@
> { Rhs = functor(cons(qualified(PredModule, PredName), Arity),
> InputVars) },
>
> - { Uni = construct(Var, ConsId, InputVars, Modes) },
> + { Uni = construct(Var, ConsId, InputVars, Modes,
> + no, cell_is_unique, no) },
Likewise here.
> @@ -816,8 +803,8 @@
> SuppArity), LambdaInputs) },
>
> { Unify = construct(InputVar,
> - pred_const(SuppPredId, SuppProcId),
> - LambdaInputs, UniModes) },
> + pred_const(SuppPredId, SuppProcId, (aditi_bottom_up)),
> + LambdaInputs, UniModes, no, cell_is_unique, no) },
> { UnifyContext = unify_context(explicit, []) },
Likewise here.
--
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list