Skip to content

Commit 377170f

Browse files
committed
Introduce JERRY_HEAVY_DEBUG preprocessor definition and move heavy checks in literal storage under it.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
1 parent 6eb65fa commit 377170f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

jerry-core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ project (JerryCore CXX C ASM)
173173
if("${BUILD_MODE}" STREQUAL "UNITTESTS")
174174
target_compile_definitions(${TARGET_NAME}.jerry-core INTERFACE ${DEFINES_JERRY})
175175
target_include_directories(${TARGET_NAME}.jerry-core INTERFACE ${INCLUDE_CORE})
176+
target_compile_definitions(${TARGET_NAME}.jerry-core PRIVATE JERRY_HEAVY_DEBUG)
176177
endif()
177178
endfunction()
178179

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

Lines changed: 2 additions & 2 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))
@@ -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 ();

jerry-core/rcs/rcs-recordset.cpp

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)