aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-03 14:45:43 +0100
committerRichard Brooksby2012-09-03 14:45:43 +0100
commit15fc448c3566df26057b32df34a95aa9bfaf9e38 (patch)
treec3253818d84ad36887f6750d148cd23c14eeef47 /mps/code
parente6db77eca34d22050ae19d785c611ec9876f97e5 (diff)
downloademacs-15fc448c3566df26057b32df34a95aa9bfaf9e38.tar.gz
emacs-15fc448c3566df26057b32df34a95aa9bfaf9e38.zip
Resolving fixmes.
Removing test on check level in critical path asserts in cool variety, as they had no measurable impact. Copied from Perforce Change: 179199 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/check.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/mps/code/check.h b/mps/code/check.h
index d5209cf7945..0c621cfcfc6 100644
--- a/mps/code/check.h
+++ b/mps/code/check.h
@@ -83,10 +83,10 @@
83 * checking level is required -- where recompilation or relinking is 83 * checking level is required -- where recompilation or relinking is
84 * undesirable or impossible. 84 * undesirable or impossible.
85 * 85 *
86 * FIXME: Should also allow the check level variable to come from an 86 * TODO: Should also allow the check level variable to come from an
87 * environment variable. 87 * environment variable.
88 * 88 *
89 * FIXME: CheckLevelDEEP asserts on arena creation with bootstrapping 89 * TODO: CheckLevelDEEP asserts on arena creation with bootstrapping
90 * problems. It clearly hasn't been tried for a while. RB 2012-09-01 90 * problems. It clearly hasn't been tried for a while. RB 2012-09-01
91 */ 91 */
92 92
@@ -134,19 +134,14 @@ extern unsigned CheckLevel;
134 134
135#if defined(AVER_AND_CHECK_ALL) 135#if defined(AVER_AND_CHECK_ALL)
136 136
137/* FIXME: Find out whether these tests on checklevel have any performance
138 impact and remove them if possible. */
139
140#define AVER_CRITICAL(cond) \ 137#define AVER_CRITICAL(cond) \
141 BEGIN \ 138 BEGIN \
142 if (CHECKLEVEL != CheckLevelMINIMAL) \ 139 ASSERT(cond, #cond); \
143 ASSERT(cond, #cond); \
144 END 140 END
145 141
146#define AVERT_CRITICAL(type, val) \ 142#define AVERT_CRITICAL(type, val) \
147 BEGIN \ 143 BEGIN \
148 if (CHECKLEVEL != CheckLevelMINIMAL) \ 144 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val); \
149 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val); \
150 END 145 END
151 146
152#else 147#else
@@ -281,8 +276,8 @@ extern unsigned CheckLevel;
281 276
282#else /* AVER_AND_CHECK_ALL, not */ 277#else /* AVER_AND_CHECK_ALL, not */
283 278
284/* FIXME: This gives comparable performance to white-hot when compiling 279/* TODO: This gives comparable performance to white-hot when compiling
285 using mps.c and -O (to get check methods inlined), but is it a bit 280 using mps.c and -O3 (to get check methods inlined), but is it a bit
286 too minimal? How much do we rely on check methods? */ 281 too minimal? How much do we rely on check methods? */
287 282
288#define CHECKL(cond) DISCARD(cond) 283#define CHECKL(cond) DISCARD(cond)