[m-dev.] for review: cleanup of type_ctor_infos, relative diff 1
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Mar 10 16:41:14 AEDT 2000
On 10-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> for (i = 0; i < arity; i++) {
> if (MR_arg_has_own_contain_var_bit(i) ?
> MR_initial_arg_type_may_contain_var(functor_desc, i) :
> MR_later_arg_type_may_contain_var(functor_desc))
Those three lines of code look like a useful abstraction;
it would be good to define a macro which encapsulates them:
#define MR_arg_type_may_contain_var(functor_desc, i) \
( MR_arg_has_own_contain_var_bit(i) \
? MR_initial_arg_type_may_contain_var((functor_desc), (i)) \
: MR_later_arg_type_may_contain_var(functor_desc))
--
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