Revision f230a1cf deps/v8/src/checks.h

View differences:

deps/v8/src/checks.h
272 272
#endif
273 273

  
274 274

  
275
#ifdef DEBUG
276
#ifndef OPTIMIZED_DEBUG
277
#define ENABLE_SLOW_ASSERTS    1
278
#endif
279
#endif
280

  
281
namespace v8 {
282
namespace internal {
283
#ifdef ENABLE_SLOW_ASSERTS
284
#define SLOW_ASSERT(condition) \
285
  CHECK(!v8::internal::FLAG_enable_slow_asserts || (condition))
275 286
extern bool FLAG_enable_slow_asserts;
287
#else
288
#define SLOW_ASSERT(condition) ((void) 0)
289
const bool FLAG_enable_slow_asserts = false;
290
#endif
291
}  // namespace internal
292
}  // namespace v8
276 293

  
277 294

  
278 295
// The ASSERT macro is equivalent to CHECK except that it only
......
285 302
#define ASSERT_GE(v1, v2)      CHECK_GE(v1, v2)
286 303
#define ASSERT_LT(v1, v2)      CHECK_LT(v1, v2)
287 304
#define ASSERT_LE(v1, v2)      CHECK_LE(v1, v2)
288
#define SLOW_ASSERT(condition) CHECK(!FLAG_enable_slow_asserts || (condition))
289 305
#else
290 306
#define ASSERT_RESULT(expr)    (expr)
291 307
#define ASSERT(condition)      ((void) 0)
......
294 310
#define ASSERT_GE(v1, v2)      ((void) 0)
295 311
#define ASSERT_LT(v1, v2)      ((void) 0)
296 312
#define ASSERT_LE(v1, v2)      ((void) 0)
297
#define SLOW_ASSERT(condition) ((void) 0)
298 313
#endif
299 314
// Static asserts has no impact on runtime performance, so they can be
300 315
// safely enabled in release mode. Moreover, the ((void) 0) expression

Also available in: Unified diff