From 84ff4de3859a3aad3e720570dd57ace28dd2bd06 Mon Sep 17 00:00:00 2001 From: Sung-Jae Lee Date: Wed, 9 Sep 2015 19:21:56 +0300 Subject: [PATCH 1/3] Fix MEM_STATS build configuration. JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com --- jerry-core/jerry.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/jerry-core/jerry.cpp b/jerry-core/jerry.cpp index 47082cd13..b7d4aef65 100644 --- a/jerry-core/jerry.cpp +++ b/jerry-core/jerry.cpp @@ -1330,7 +1330,7 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */ #endif /* !JERRY_ENABLE_LOG */ } - if (flags & (JERRY_FLAG_MEM_STATS)) + if (flags & (JERRY_FLAG_MEM_STATS | JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE)) { #ifndef MEM_STATS flags &= ~(JERRY_FLAG_MEM_STATS @@ -1340,13 +1340,6 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */ JERRY_WARNING_MSG ("Ignoring memory statistics option because of '!MEM_STATS' build configuration.\n"); #endif /* !MEM_STATS */ } - else if (flags & (JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE)) - { - flags &= ~(JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE); - - JERRY_WARNING_MSG ( - "Ignoring detailed memory statistics options because memory statistics dump mode is not enabled.\n"); - } jerry_flags = flags; From b6fcf44873060dc5d59f7d9840edbdf6ed906f74 Mon Sep 17 00:00:00 2001 From: Sung-Jae Lee Date: Thu, 10 Sep 2015 12:25:55 +0300 Subject: [PATCH 2/3] 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 */ } From 86e690ce7249ccc28b5ab5e0a734b897429f62b5 Mon Sep 17 00:00:00 2001 From: Sung-Jae Lee Date: Mon, 14 Sep 2015 21:17:23 +0900 Subject: [PATCH 3/3] Fix preprocess claus style. JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com --- jerry-core/jerry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-core/jerry.cpp b/jerry-core/jerry.cpp index ef8e84201..11a482ae4 100644 --- a/jerry-core/jerry.cpp +++ b/jerry-core/jerry.cpp @@ -1343,7 +1343,7 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */ { flags |= JERRY_FLAG_MEM_STATS; } -#endif /* !MEM_STATS */ +#endif /* MEM_STATS */ } jerry_flags = flags;