diff: bug fix for `incr_hp_msg' name clash
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Jan 24 02:25:12 AEDT 1998
On 23-Jan-1998, Henk Vandecasteele <Henk.Vandecasteele at cs.kuleuven.ac.be> wrote:
> PS what is the --debug option doing? I get compilation errors with
> that:
...
> /home/henkv/mercury-rotd-01-20.s/lib/mercury/inc/mercury_misc.h:27:
> macro `incr_hp_msg' used with only 2 args
> make[2]: *** [check_constraints.o] Error 1
runtime/mercury_debug.h:
runtime/mercury_misc.h:
runtime/mercury_misc.c:
Fix a name clash: the code here and in mercury_heap.h
were using the name `incr_hp_msg' to mean two different things.
The reason this wasn't picked up earlier is that the
code here is only included conditionally, if DEBUG is defined.
To fix it, I renamed the one here as `incr_hp_debug_msg'.
cvs diff runtime/mercury_debug.h runtime/mercury_misc.c runtime/mercury_misc.h
Index: runtime/mercury_debug.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_debug.h,v
retrieving revision 1.2
diff -u -r1.2 mercury_debug.h
--- mercury_debug.h 1997/11/23 07:21:16 1.2
+++ mercury_debug.h 1998/01/23 15:14:37
@@ -74,7 +74,8 @@
IF (heapdebug, (save_transient_registers(), cr2_msg(val0, val1, hp)))
#define debugincrhp(val, hp) \
- IF (heapdebug, (save_transient_registers(), incr_hp_msg((val), (hp))))
+ IF (heapdebug, \
+ (save_transient_registers(), incr_hp_debug_msg((val), (hp))))
#define debugincrsp(val, sp) \
IF (detstackdebug, (save_transient_registers(), incr_sp_msg((val), (sp))))
Index: runtime/mercury_misc.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_misc.c,v
retrieving revision 1.2
diff -u -r1.2 mercury_misc.c
--- mercury_misc.c 1997/11/23 07:21:28 1.2
+++ mercury_misc.c 1998/01/23 15:14:46
@@ -164,7 +164,7 @@
}
void
-incr_hp_msg(Word val, const Word *addr)
+incr_hp_debug_msg(Word val, const Word *addr)
{
#ifdef CONSERVATIVE_GC
printf("allocated %ld words at 0x%p\n", (long) (Integer) val, addr);
Index: runtime/mercury_misc.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_misc.h,v
retrieving revision 1.2
diff -u -r1.2 mercury_misc.h
--- mercury_misc.h 1997/11/23 07:21:29 1.2
+++ mercury_misc.h 1998/01/23 15:22:59
@@ -24,7 +24,7 @@
extern void proceed_msg(void);
extern void cr1_msg(Word val0, const Word *addr);
extern void cr2_msg(Word val0, Word val1, const Word *addr);
-extern void incr_hp_msg(Word val, const Word *addr);
+extern void incr_hp_debug_msg(Word val, const Word *addr);
extern void incr_sp_msg(Word val, const Word *addr);
extern void decr_sp_msg(Word val, const Word *addr);
extern void push_msg(Word val, const Word *addr);
--
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