[m-rev.] diff: fix MR_tag_offset_sanity_check() bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Oct 21 20:04:13 AEST 2003
Estimated hours taken: 0.5
Branches: main
Fix a bug in zs's recent term size profiling change which caused compilation/
link errors when building the runtime in non-conservative GC grades.
runtime/mercury_heap.h:
Ensure that MR_tag_offset_sanity_check() is defined even when
MR_CONSERVATIVE_GC is not defined.
Workspace: /home/ceres/fjh/mercury
Index: runtime/mercury_heap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_heap.h,v
retrieving revision 1.28
diff -u -d -r1.28 mercury_heap.h
--- runtime/mercury_heap.h 20 Oct 2003 07:29:31 -0000 1.28
+++ runtime/mercury_heap.h 21 Oct 2003 09:59:22 -0000
@@ -23,22 +23,22 @@
#endif
#ifdef MR_CONSERVATIVE_GC
-
#ifdef MR_MPS_GC
#include "mercury_mps.h"
#endif
#ifdef MR_BOEHM_GC
#include "gc.h"
#endif
+#endif
- /*
- ** Unfortunately, the following macros cannot expand to statements;
- ** they must be usable inside expressions. The ultimate reason for this is
- ** MR_float_to_word, which is used not just as an operand in expressions,
- ** but also as an initializer in static cells generated by the compiler.
- */
+/*
+** Unfortunately, the following macros cannot expand to statements;
+** they must be usable inside expressions. The ultimate reason for this is
+** MR_float_to_word, which is used not just as an operand in expressions,
+** but also as an initializer in static cells generated by the compiler.
+*/
- #ifdef MR_DEBUG_HEAP_ALLOC
+#ifdef MR_DEBUG_HEAP_ALLOC
#define MR_tag_offset_sanity_check(offset, count) \
( ((offset) >= (count)) \
@@ -46,11 +46,13 @@
: ((void) 0) \
)
- #else /* ! MR_DEBUG_HEAP_ALLOC */
+#else /* ! MR_DEBUG_HEAP_ALLOC */
- #define MR_tag_offset_sanity_check(offset, count) ((void) 0)
+ #define MR_tag_offset_sanity_check(offset, count) ((void) 0)
- #endif /* MR_DEBUG_HEAP_ALLOC */
+#endif /* MR_DEBUG_HEAP_ALLOC */
+
+#ifdef MR_CONSERVATIVE_GC
#define MR_tag_offset_incr_hp_base(dest, tag, offset, count, \
alloc, is_atomic) \
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list