Skip to content

Commit e7649ad

Browse files
committed
Introduce JERRY_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.
JERRY_HEAVY_DEBUG is enabled only for unit tests. JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
1 parent 8a9633d commit e7649ad

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

jerry-core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ project (JerryCore CXX C ASM)
4343
set(DEFINES_JERRY_RELEASE JERRY_NDEBUG)
4444

4545
# Unit tests
46-
set(DEFINES_JERRY_UNITTESTS JERRY_ENABLE_PRETTY_PRINTER)
46+
set(DEFINES_JERRY_UNITTESTS JERRY_ENABLE_PRETTY_PRINTER JERRY_HEAVY_DEBUG)
4747

4848
# Modifiers
4949
# Full profile

jerry-core/rcs/rcs-chunked-list.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void
289289
rcs_chunked_list_t::assert_list_is_correct (void)
290290
const
291291
{
292-
#ifndef JERRY_NDEBUG
292+
#ifdef JERRY_HEAVY_DEBUG
293293
for (node_t *node_iter_p = get_first ();
294294
node_iter_p != NULL;
295295
node_iter_p = get_next (node_iter_p))
@@ -308,7 +308,7 @@ const
308308
&& next_node_p != NULL
309309
&& get_prev (next_node_p) == node_iter_p));
310310
}
311-
#endif /* !JERRY_NDEBUG */
311+
#endif /* JERRY_HEAVY_DEBUG */
312312
} /* rcs_chunked_list_t::assert_list_is_correct */
313313

314314
/**
@@ -318,7 +318,7 @@ void
318318
rcs_chunked_list_t::assert_node_is_correct (const rcs_chunked_list_t::node_t* node_p) /**< the node */
319319
const
320320
{
321-
#ifndef JERRY_NDEBUG
321+
#ifdef JERRY_HEAVY_DEBUG
322322
JERRY_ASSERT (node_p != NULL);
323323

324324
assert_list_is_correct ();
@@ -337,7 +337,7 @@ const
337337
}
338338

339339
JERRY_ASSERT (is_in_list);
340-
#else /* JERRY_NDEBUG */
340+
#else /* JERRY_HEAVY_DEBUG */
341341
(void) node_p;
342-
#endif /* JERRY_NDEBUG */
342+
#endif /* JERRY_HEAVY_DEBUG */
343343
} /* rcs_chunked_list_t::assert_node_is_correct */

jerry-core/rcs/rcs-recordset.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ rcs_recordset_t::get_record_size (rcs_record_t* rec_p) /**< record */
613613
void
614614
rcs_recordset_t::assert_state_is_correct (void)
615615
{
616-
#ifndef JERRY_NDEBUG
616+
#ifdef JERRY_HEAVY_DEBUG
617617
size_t node_size_sum = 0;
618618
size_t record_size_sum = 0;
619619

@@ -658,7 +658,7 @@ rcs_recordset_t::assert_state_is_correct (void)
658658
}
659659

660660
JERRY_ASSERT (node_size_sum == record_size_sum);
661-
#endif /* !JERRY_NDEBUG */
661+
#endif /* JERRY_HEAVY_DEBUG */
662662
} /* rcs_recordset_t::assert_state_is_correct */
663663

664664
/**

0 commit comments

Comments
 (0)