[m-dev.] diff/for review: changes to runtime for non-gcc C compilers

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jul 15 17:10:34 AEST 1998


On 15-Jul-1998, Tyson Dowd <trd at stimpy.cs.mu.oz.au> wrote:
> > -Word *
> > +static Word *
> >  deep_copy_type_info(Word *type_info, Word *lower_limit, Word *upper_limit)
> >  {
> >  	if (in_range(type_info)) {
> 
> XXX check this in my change.

?

> > -  MR_MAKE_STACK_LAYOUT_ENTRY(engine_done);
> > +  MR_MAKE_STACK_LAYOUT_ENTRY(engine_done)
> 
> Wouldn't it be easier to leave the semicolon off the macro definition
> than all the uses? Otherwise people are just going to add new ones
> with semicolons anyway.

The trouble with that is that the macro expands to nothing if
stack layouts are not enabled.

I could change it to expand to something like
`extern int MR_unused_bogus_variable' instead of nothing.
But that seemed like a bit of a hack to me.

> > +  #define hp_alloc_atomic(count)					\
> > +		incr_hp_atomic(LVALUE_CAST(Word, MR_hp), (count)), 	\
> > +		MR_hp += (count),					\
> > +		(void)0							\
> > +	)
> 
> The parentheses don't match in hp_alloc_atomic.  Should there be a '('
> after hp_alloc_atomic(count)?

Oops, yes.  Thanks.  I'll fix that.

> > +/* XXX should move this to mercury_tabling.c */
> 
> Were you intending to do this in this diff?

Nope, that one isn't a portability fix, so I thought it was best
to leave that for a separate change.

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