From b6fcf44873060dc5d59f7d9840edbdf6ed906f74 Mon Sep 17 00:00:00 2001 From: Sung-Jae Lee Date: Thu, 10 Sep 2015 12:25:55 +0300 Subject: [PATCH] Fix dependency of memory statistics options. JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com --- jerry-core/jerry.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jerry-core/jerry.cpp b/jerry-core/jerry.cpp index b7d4aef65..ef8e84201 100644 --- a/jerry-core/jerry.cpp +++ b/jerry-core/jerry.cpp @@ -1338,6 +1338,11 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */ | JERRY_FLAG_MEM_STATS_SEPARATE); JERRY_WARNING_MSG ("Ignoring memory statistics option because of '!MEM_STATS' build configuration.\n"); +#else /* !MEM_STATS */ + if (flags & (JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE)) + { + flags |= JERRY_FLAG_MEM_STATS; + } #endif /* !MEM_STATS */ }