[m-dev.] For review: revised changes to runtime for global heap

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jun 17 23:51:46 AEST 1998


On 17-Jun-1998, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> > >  #define MR_NUM_SPECIAL_REG	10
> > 
> > You need to change that to 11 now.
> ...
> > However, the existing definition of MR_NUM_SPECIAL_REG is wrong in the
> > `defined(MR_THREAD_SAFE) && NUM_REAL_REGS > 0' case -- it should
> > be 11 before your addition of global_hp and 12 after it.
> > You might as well fix that one while you're at it.
> 
> I don't understand this (I can't see what MR_NUM_SPECIAL_REG is for), but 
> done.

MR_NUM_SPECIAL_REG should be the number of "special" Mercury virtual registers;
that is, the number of Mercury virtual registers other than the
general-purpose ones r<N>.  If you add a new special-purpose virtual register,
as you have done, then you need to increment it.

If you are wondering why we need to know this,
i.e. what code makes use of this macro, try grep ;-)

Anyway, your diff looks fine, so please commit it.

Cheers,
	Fergus.

-- 
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