Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.

Heavy debug is enabled only for unit tests.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-06-15 17:04:44 +03:00
parent d803c3bc82
commit a293e21147
9 changed files with 30 additions and 21 deletions
+3 -3
View File
@@ -86,12 +86,12 @@ extern void __noreturn jerry_unreachable (const char *comment, const char *file,
extern void __noreturn jerry_unimplemented (const char *comment, const char *file, const char *function,
const uint32_t line);
#ifndef JERRY_NDEBUG
#if !defined (JERRY_NDEBUG) || !defined (JERRY_DISABLE_HEAVY_DEBUG)
#define JERRY_ASSERT(x) do { if (__builtin_expect (!(x), 0)) { \
jerry_assert_fail (#x, __FILE__, __func__, __LINE__); } } while (0)
#else /* !JERRY_NDEBUG */
#else /* !JERRY_NDEBUG || !JERRY_DISABLE_HEAVY_DEBUG*/
#define JERRY_ASSERT(x) do { if (false) { (void)(x); } } while (0)
#endif /* !JERRY_NDEBUG */
#endif /* JERRY_NDEBUG && JERRY_DISABLE_HEAVY_NEBUG */
#ifdef JERRY_ENABLE_LOG
#define JERRY_LOG(lvl, ...) \