[m-dev.] for review: fix array dependency problem

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Dec 22 03:40:08 AEDT 2000


On 21-Dec-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> Hi,
> 
> This change bootchecks, but has one outstanding issue.
> 
> That is that there exists the following declaration in mercury.c:
> 
> static MR_UnifyFunc_1 mercury__array__do_unify__array_1_0;
> 
> and I am not sure what to do with it?

That declaration is used by the following macro invocation
in mercury.c:

	MR_define_type_ctor_info(array, array, 1, MR_TYPECTOR_REP_ARRAY);

So you haven't actually removed the dependency.

One possible solution might be to move the line

	MR_define_type_ctor_info(array, array, 1, MR_TYPECTOR_REP_ARRAY);

into library/array.m, and move the macros that it references (directly
or indirectly) from runtime/mercury.c into one of the header files,
e.g. runtime/mercury.h or runtime/mercury_type_info.h.
However, I don't know if the array type_ctor_info is referred to
from elsewhere in the runtime.

Another possible solution would be to use function pointers,
like we currently do with the MR_address_of_* variables.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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